+ Reply to Thread
Results 1 to 6 of 6

add two sums and return blank cell when sum value totals zero

  1. #1
    Registered User
    Join Date
    03-15-2013
    Location
    southampton
    MS-Off Ver
    Excel 2007
    Posts
    11

    add two sums and return blank cell when sum value totals zero

    Hi, I am trying to find a formula to add the value in each row of column Z to the corresponding row in column AQ and display the results in column AS.

    The present formula works fine as long as there is no blank cell in any of the rows Z or AQ. If you look at the cells highlighted red (AS9 & AS11), these are picking up blank cells and instead of showing values of 4 and 16 respectively, they are showing blank cells.

    Attached is a spreadsheet which hopefully further explains the issue I have.

    If anyone can assist in providing a formula which works, this would be appreciated.

    Thanks

    Andy
    Attached Files Attached Files

  2. #2
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: add two sums and return blank cell when sum value totals zero

    Hi AMD1

    It works if you put 0 value instead of "" in the formula Z4 and copy down!
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  3. #3
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,883

    Re: add two sums and return blank cell when sum value totals zero

    SUM will not pic up the empty cells and will not cause an error.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  4. #4
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: add two sums and return blank cell when sum value totals zero

    this will leave the cell blank only if both are blanks and then test the each column for a blank

    =IF(AND(Z11="",AQ11=""),"",IF(Z11<>"",Z11,0)+if(AQ11<>"",aq11,0))

  5. #5
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,883

    Re: add two sums and return blank cell when sum value totals zero

    Like this then
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    03-15-2013
    Location
    southampton
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: add two sums and return blank cell when sum value totals zero

    Thank you all for your help which resolved my problem.

+ 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