This should do the trick:
=IF(AND(A1="",B1=""),"",A1+B1)
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".
=if(count(a1:b1)>1,a1+b1,"")
Bookmarks