+ Reply to Thread
Results 1 to 5 of 5

Linked Nested IF formula returning 0 and not blank

  1. #1
    Registered User
    Join Date
    10-25-2012
    Location
    staffordshire, UK
    MS-Off Ver
    Excel 2003 excel 2010
    Posts
    18

    Linked Nested IF formula returning 0 and not blank

    Hi

    I have been looking everywhere fore a solution to this and I am sure I have been close but I just can't see the wood for the trees.

    Here goes

    I have a nested IF formula that is working from what value is returned in a different cell, but if no data is in the cell it returns as 0 and not blank. I have tried "" but I must be doing something wrong.

    IF(AND(A1="",B1=""),"",A1+B1) = answer in Cell C1 and blank if there is no data in A1 and B1.

    Nested IF

    In D7 if(C1=0,10%,IF(C1=1,5%,IF(C1>1,0%)))

    So as you can see I need the formular to recognise 0 but not blank cells.

    Please help

    Phill

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,412

    Re: Linked Nested IF formula returning 0 and not blank

    Put this in D7:

    =IF(C1="","",if(C1=0,10%,IF(C1=1,5%,IF(C1>1,0%))))

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    10-25-2012
    Location
    staffordshire, UK
    MS-Off Ver
    Excel 2003 excel 2010
    Posts
    18

    Re: Linked Nested IF formula returning 0 and not blank

    Thanks Pete

    It works just fine - I cant believe it was only one quotation mark!

    Thanks again

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,186

    Re: Linked Nested IF formula returning 0 and not blank

    Are you ever likely to get a negative number in cell C1? If you do, the formula will return FALSE as you do not cater for that condition.

    If it can never be less than zero, not a problem. Might be worth noting for future reference though.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,412

    Re: Linked Nested IF formula returning 0 and not blank

    Quote Originally Posted by the3rdman77 View Post
    It works just fine - I cant believe it was only one quotation mark!
    If you link to another cell (eg =C1) and that cell is empty, then Excel will treat it as being zero, so if you want a blank returned instead then you have to do:

    =IF(C1="","",C1)

    Now if C1 contains zero that will be returned correctly.

    Hope this helps.

    Pete

    P.S. You might like to mark the thread as Solved if you consider it to be so (the FAQ describes how).

+ 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