Formula help


Posted by Kevin on January 21, 2002 9:38 AM

Cell C1 is equal to the sum of A1 and B1. The sum will usually be a number from zero to whatever (always positive). Occasionally both A1 and B1 are blank. When this is so I need C1 to stay blank so as not to screw up another formula.

Any help would be appreciated.

Posted by Robin on January 21, 2002 9:43 AM

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

Posted by Tom Dickinson on January 21, 2002 9:44 AM

=IF(AND(ISBLANK(A1),ISBLANK(B1)),"",SUM(A1:B1)) (NT)

Posted by Aladin Akyurek on January 21, 2002 9:49 AM

Kevin --

What is the other formula that gets screwed up when C1 = 0?

Aladin

==========

Posted by Kevin on January 21, 2002 10:35 AM

I have a formula that computes the sum of the last 7 (14 and 28 also) entries in a column. This formula averages in the zeroes but not the blanks (which is what I want it to do).
The formula I'm using is
=SUM(C219:INDEX(C:C,LARGE(IF(C6:C219<>"",ROW(C6:C219)),7)))



Posted by Aladin Akyurek on January 21, 2002 11:23 AM

I see - you need a blank in C1 when SUM(A1:B1)=0.

In that case

=IF(SUM(A1:B1),SUM(A1:B1),"")

is maybe what you want.

Aladin

=================