+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Remove zero awaiting IF implementation

  1. #1
    Registered User
    Join Date
    05-21-2011
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    19

    Remove zero awaiting IF implementation

    I want to show in cell D6 the value in cell C6 if values in B6 and C6 are the same; if they are different, I want D6 blank. To do this I use in D6 the formula: =IF(B6=C6,C6,""). All this works fine; however, until some value is entered into either B6 or C6, D6 now has "0" in it. Is there any way of having the "0" not appear in cell D6?

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Remove zero awaiting IF implementation

    Hello and welcome to the forum,

    All you need is another nested IF statement. Untested but should work:

    Please Login or Register  to view this content.
    Hope this helps.

    abousetta

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Remove zero awaiting IF implementation

    Hello,

    you could add a condition to the formula that will test the total length of the characters

    =IF(AND(LEN(B6&C6)>0,B6=C6),C6,"")

    Or you could use a custom format to suppress zero values (but that would also suppress a 'legitimate' 0 value, when both cells contain a 0)

    General;;;@

  4. #4
    Registered User
    Join Date
    05-21-2011
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Remove zero awaiting IF implementation

    Quote Originally Posted by abousetta View Post
    Hello and welcome to the forum,

    All you need is another nested IF statement. Untested but should work:

    Please Login or Register  to view this content.
    Hope this helps.

    abousetta

    Many thanks - works perfectly
    13sydwest

  5. #5
    Registered User
    Join Date
    05-21-2011
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Remove zero awaiting IF implementation

    Quote Originally Posted by teylyn View Post
    Hello,

    you could add a condition to the formula that will test the total length of the characters

    =IF(AND(LEN(B6&C6)>0,B6=C6),C6,"")

    Or you could use a custom format to suppress zero values (but that would also suppress a 'legitimate' 0 value, when both cells contain a 0)

    General;;;@

    Many thanks - works perfectly
    13sydwest

  6. #6
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Remove zero awaiting IF implementation

    Hi,

    Glad we were able to help. If you are satisfied with the results, please mark the thread as [SOLVED] (next to the title on the first post). Also positive recognition (scales) are always welcomed. If you have any further questions, please re-post.

    If want to mark the post as solved then:

    1) Click the Edit button on your first post in the thread
    2) Click Go Advanced
    3) select [SOLVED] from the Prefix dropdown
    4) click Save Changes

    Good luck.

    abousetta

+ 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