+ Reply to Thread
Results 1 to 7 of 7

LEFT formula, cell format as number?

  1. #1
    Registered User
    Join Date
    04-28-2010
    Location
    Sweden / Finland
    MS-Off Ver
    Excel 2007
    Posts
    5

    LEFT formula, cell format as number?

    In K column I always enter a size with letter x in the middle. For instance 28x56 in K8.

    In the L column I have a LEFT formula, in L8 it is =LEFT(K8;2) which gives me the answer 28. In M I make the same with RIGHT formula which gives me 56. Everything is ok so far.

    In N column I enter how many pieces I need of this part. For instance 20 in N8.


    In the end of this row I need to see what L8 * N8 is with this formula
    =IF(K8=28;L8*N8;"")

    However, although K8 is 28 it gives me nothing. I guess it is because K8 is a formula which gives me 28, but the value isn't actually 28.

    How can I make this formula work?

    I know I can enter the LEFT formula inside the IF formula but I prefer to have two different cells.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: LEFT formula, cell format as number?

    But K8 is not 28 it is 28x56

    Try this formula to return the value 1568.

    =IFERROR(L8*M8;"")

    Why not enter the two values, 28 and 56, in separate columns?
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: LEFT formula, cell format as number?

    Quote Originally Posted by netvic View Post
    In the L column I have a LEFT formula, in L8 it is =LEFT(K8;2)
    so shouldn't you be checking L8 for 28 not K8?

    LEFT function always returns a text value; try converting to a number like this

    =LEFT(K8;2)+0

    then this formula should work

    =IF(L8=28;L8*N8;"")
    Audere est facere

  4. #4
    Registered User
    Join Date
    10-08-2010
    Location
    Steubenville, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: LEFT formula, cell format as number?

    In the example you provided you have entered, in your words, "For instance 28x56 in K8."

    With this in mind, your formula will produce no result as K8 does not equal 28. Additionally, it may just be a type but your formula has semi0colons instead of commas. Should read =IF(K8=28,L8*N8,"")
    but I suspect you should read =IF(L8=28,L8*N8,"")

  5. #5
    Registered User
    Join Date
    10-08-2010
    Location
    Steubenville, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: LEFT formula, cell format as number?

    If you are having issues wiith it not recognizing L8 as a number include the 28 in quotes like

    =IF(L8="28",L8*N8,"")

    This would provide the correct result of 560

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: LEFT formula, cell format as number?

    I see I screwed up my cell references and expected result.

    Try this formula to return the value 560.

    =IFERROR(L8*N8;"")

    @DonFlak, semicolon separators are fine for some non USA version of excel.

  7. #7
    Registered User
    Join Date
    04-28-2010
    Location
    Sweden / Finland
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: LEFT formula, cell format as number?

    Quote Originally Posted by DonFlak View Post
    If you are having issues wiith it not recognizing L8 as a number include the 28 in quotes like

    =IF(L8="28",L8*N8,"")

    This would provide the correct result of 560


    I spelled wrong here. In excel the IF formula of course was L8 and not K8, so that was not the solution.

    But when I added quotes in the formula everything is working as it should.

    Thank you DonFlak!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1