How to "Do Not Display",

jPaulB

New member
Joined
Sep 26, 2013
Messages
7
Reaction score
0
Points
1
Location
Moncton, NB, Canada
Excel Version(s)
Microsoft Office 2019
Hi everybody,

I have a formula in a cell that adds the value of two cells.

Essentially, the formula is =SUM(A1+B1) and it is in cell C1

The thing is, if either of the values of "A" and "B" are blank or null, I want the value of C1 to display a null.

However, =IF(A1 .AND. B1="", "", SUM(A1+B1)) kinda chokes out excel 2003.

How do I express an "IF" statement that needs to test two values?

Many thanks,

Paul
 
This should do the trick:
=IF(AND(A1="",B1=""),"",A1+B1)
 
try this for either A1 or B1 blank or NULL

=IF(OR(A1="",B1=""),"",A1+B1)
 
NoS, you're right, my formula isn't "either" :doh:.
 
Back
Top