+ Reply to Thread
Results 1 to 7 of 7

How to sum cells but not show zero if cells are blank?

  1. #1
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161

    How to sum cells but not show zero if cells are blank?

    Hi all,

    can anyone tell me how to sum cells without showing zero if cells are blank?

    regards
    Simon

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    Simon:

    Perhaps something like this:

    A21: =IF(COUNT(A1:A20)=0,"",SUM(A1:A20))

    If there are NO numbers in A1:A20, the formula returns "" (effectively, a blank). Otherwise, it returns the total.

    Does that help?

    Regards,
    Ron

  3. #3
    Paul B
    Guest

    Re: How to sum cells but not show zero if cells are blank?

    Simon, here is one way,

    =IF(SUM(A1:A10)=0,"",SUM(A1:A10))
    --
    Paul B
    Always backup your data before trying something new
    Please post any response to the newsgroups so others can benefit from it
    Feedback on answers is always appreciated!
    Using Excel 2002 & 2003

    "Simon Lloyd" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi all,
    >
    > can anyone tell me how to sum cells without showing zero if cells are
    > blank?
    >
    > regards
    > Simon
    >
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile:
    > http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=549933
    >




  4. #4
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    Thanks for the speedy reply both!, it did help alot, but i have one other problem, i need the statement to be an or statement i.e =IF(SUM(P5:Q5)=0,"",SUM(R4-P5+Q5)) needs to be something like =IF(SUM(P4)=0,(IF(SUM(Q4)=0,"",SUM(R3-P4+Q4)))) but this returns a value FALSE, it needs to say if P4 is 0 then sum R3+Q4 or If Q4 is 0 then sum R3-P4 Or if there are values in both then R3-P4+Q4 and of course if there are no values in P4,Q4 then dont show zero!

    Phew! its clear as mud to me hope you can sort the muddle!

    regards,
    Simon

  5. #5
    Registered User
    Join Date
    08-06-2013
    Location
    Perth, Western Australia
    MS-Off Ver
    Excel 2007
    Posts
    1

    Question Re: How to sum cells but not show zero if cells are blank?

    I want to go the other way

    I am working on an existing spreadsheet which is showing a blank if the answer is zero, but I want to show the zero

    Can any one help me with what to look for or do to correct or change it to show a zero

    thank you
    rog

  6. #6
    Forum Contributor
    Join Date
    07-02-2013
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    197

    Re: How to sum cells but not show zero if cells are blank?

    Quote Originally Posted by rogerwarr View Post
    I want to go the other way

    I am working on an existing spreadsheet which is showing a blank if the answer is zero, but I want to show the zero

    Can any one help me with what to look for or do to correct or change it to show a zero

    thank you
    rog
    I don't know how your formulas are written. Maybee it's as simple as the general settings for your worksheet i set not to show zero values (See Excel-alternatives - Advanced)

  7. #7
    Registered User
    Join Date
    08-05-2013
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: How to sum cells but not show zero if cells are blank?

    Hi Roger,

    You can try this.

    =IF(A2=0,"",SUM(A2:A20))

+ 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