Sum showing for blank values

Viewed 43

Is there any way for the SUM function to show blank if all the cells added are blank? Or any other workaround?

In this picture I try to SUM B11, D11, E11 and H11 with the following function:

=SUM(H11,E11,D11,B11)

How can I make the sum show blank if there is no data?

sheet screenshot

2 Answers

try:

=IF(SUM(H11,E11,D11,B11)=0,,SUM(H11,E11,D11,B11))

or:

=REGEXREPLACE(SUM(H11,E11,D11,B11)&"", "^0$", )

or you can set the color of the font to match color of cell background if 0

The way I do this is by taking advantage of the DIV/0 error and the IFERROR() function:

=IFERROR(1/(1/SUM(H11,E11,D11,B11)))
Related