+ Reply to Thread
Results 1 to 7 of 7

Leave cell blank if SUM = "0"

  1. #1
    Forum Contributor
    Join Date
    01-15-2008
    Posts
    140

    Smile Leave cell blank if SUM = "0"

    I am using a simple SUM formula eg: E4=SUM(B4:D4) Want I want is that if B4,C4,and D4 are all 0 then I want E4 to be blank not "0".
    Last edited by tomvh444; 03-28-2011 at 02:55 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,629

    Re: Leave cell blank if SUM = "0"

    if b4,c4,and d4 are all 0 then
    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: Leave cell blank if SUM = "0"

    =if(and(b4=0,c4=0,d4=0),"",sum(b4:d4))

    This method makes sure "each" cell has a value of Zero and NOT that they Sum Zero. In other words Sum(-1,+2,-1) will return a value of Zero while Sum(0,0,0) will return a value of "".
    Last edited by nimrod; 03-27-2011 at 10:26 PM.

  4. #4
    Forum Contributor
    Join Date
    01-15-2008
    Posts
    140

    Re: Leave cell blank if SUM = "0"

    Quote Originally Posted by tomvh444 View Post
    I am using a simple SUM formula eg: E4=SUM(B4:D4) Want I want is that if B4,C4,and D4 are all 0 then I want E4 to be blank not "0".
    Thank you for the formula. E4 is now blank when SUM(B4:D4) is "0". I do however, still need some help. I also have in H4 this formula: =E4-F4-G4. I now get #VALUE! in H4 when E4 is blank. If E4 has a value in it then H4 will show the value correctly of E4-F4-G4. I would like to have H4 appear blank when E4 appears blank. Again thanking you for your help.

  5. #5
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    740

    Re: Leave cell blank if SUM = "0"

    The #VALUE error shouldn't appear, unless when typing the formula you have used " " (including a space) rather than "". Removing the sapce between the quote marks should stop the errors.

    However, to have H4 appear blank when E4 is blank, just use:

    =if(E4="","",E4-F4-G4)

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Leave cell blank if SUM = "0"

    Or you can Custom format cell as:

    Custom: 0,-0,,@

    that won't show 0 as a result

  7. #7
    Forum Contributor
    Join Date
    01-15-2008
    Posts
    140

    Smile Re: Leave cell blank if SUM = "0"

    Thank you again. You have given me the formula that does what I want. I will mark solved and recommend !

+ 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