2

My goal is to sum values in a row if they are present and leave the cell empty it there are no values. I used a formula: =SUMIF(A1:C1; "<>"; A1:C1) - but Google Sheets inserts a default value 0 - I don't want the default value.

Example: A, B, C colums are number values. D is the sum column.

This is how my formula works:

enter image description here

This is how I want it to work:

enter image description here

1
  • Please remember that as per site guidelines when an answer addresses your question, you should accept it and even upvote it so others can benefit as well. Feb 3 '20 at 12:33
2

You can omit the 0 by wrapping tour formula with the IF function:

=IF(SUMIF(A3:C3;"<>");SUMIF(A3:C3;"<>");"")

(Depending on your sheet's locale, ; could be replaced with ,)

1
  • that definitely worked until I had to add two zeroes. Then it gave me blank. How would you take in account for blanks staying blank and zeroes adding together to make zero and still be shown? May 28 at 22:00
0

Not an expert on sheets (so this may somehow identical to marikamitsos's answer, though their solution did not work for me for 0-valued rows)

I have done this in Google Sheets recently

=IF(CONCATENATE(A3:C3)="","",SUM(A3:C3))

It simply concatenates the range and checks if the result is empty. If so, it also results in an empty string. If not, it tries to resolve the sum.

You could probably adapt this with ISNUMBER or whatever other validation you need to do to before applying the sum as well.

0

Big thanks for your comments here.

I found the code for my table for delivery software working on Google Sheets.enter image description here

I use the code =IF(CONCATENATE(H41)="";"";SUM(H41+20/1440)) to add 20 minutes more for my tasks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.