formulas

S

Sandi

What kind of formula do I use for:

blank cell + blank cell = 0 how do I get it to not show if the value is 0?
 
M

MyVeryOwnSelf

What kind of formula do I use for:
blank cell + blank cell = 0 how do I get it to not show if the value
is 0?

If the cells are A1 and B2, one way is
=IF(LEN(A1&B2)=0,"",A1+B2)

If A1=17 and B2=-17, maybe you do want zero as the result -- I would. The
above formula does that.
 
T

T. Valko

=IF(A1+B1=0,"",A1+B1)

What if:

A1 = 5
B1 = -5

If the OP only wants a blank returned when *both* cells are empty:

=IF(COUNT(A1:B1)=0,"",A1+B1)

Or, to be more robust:

=IF(COUNT(A1:B1)=0,"",SUM(A1:B1))
 
Top