IF formula in spreadsheet

D

Dennis1188

C1 is the sum of A1 and A2
How can I get C1 to remain empty unless there is a number in BOTH cells.
 
P

Paul B

Dennis, this should do it, =IF(OR(ISBLANK(A1),ISBLANK(A2)),"",A1+A2)

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
D

Dennis1188

PERFECT!!!
Now let's try one other thing... I would like it to do the same thing if we
put in the number 0
 
D

Dennis1188

PERFECT!!!
Now let's try one other thing... I would like it to do the same thing if we
put in the number 0
 
P

Paul B

Dennis, If I understand you right, try this

=IF(OR(A1="",A2=""),"",IF(OR(A1<=0,A2<=0),"",A1+A2))

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
D

Dennis1188

THANK YOU!!!!!!!

Paul B said:
Dennis, If I understand you right, try this

=IF(OR(A1="",A2=""),"",IF(OR(A1<=0,A2<=0),"",A1+A2))

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
D

David Biddulph

Just one note of caution. If you've got a zero for one or both numbers,
that formula would return a blank, not zero.
 
Top