formula for SUM not using AUTOSUM

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to get a formula for 3 columns:
cols A and B may both have figures in them, or just one, or none

and I want col C, for the totals, to add them using a forumula, not simply
=SUM(A2:B2)

so if A or B are blank, C = 0
if A=1, B=0, then C=1

etc.

thanks.
 
and I want col C, for the totals, to add them using a forumula, not simply
=SUM(A2:B2)
so if A or B are blank, C = 0
if A=1, B=0, then C=1

What's wrong with "simply" =SUM(A2:B2) , does it not produce the result you want ?
 
If I understand what you correctly, I think the following
formula will accomplish your task:

=IF(ISBLANK(A1)+ISBLANK(B1)>0,0,SUM(A1:B1))

Eric
 
Nothing wrong with the simple answer, but wanted to understand something
more complex.

=IF(ISBLANK(A2)+ISBLANK(B2)>0,SUM(A2:B2))
this works if either A or B or both are blank

=IF(ISBLANK(A2)+ISBLANK(B2)>0,0,SUM(A2:B2))
this works if both A and B are nonblank

What is it if either A or just B are nonblank?

thanks
 
=IF(ISBLANK(A2)+ISBLANK(B2)>0,SUM(A2:B2))
this works if either A or B or both are blank

=IF(ISBLANK(A2)+ISBLANK(B2)>0,0,SUM(A2:B2))
this works if both A and B are nonblank

What is it if either A or just B are nonblank?

If I understand this, you want the non-blank value only when the other one
is blank ?
=IF(ISBLANK(A2)+ISBLANK(B2)=1,SUM(A2:B2),0)
 
Harald Staff said:
=IF(ISBLANK(A2)+ISBLANK(B2)>0,SUM(A2:B2))
this works if either A or B or both are blank

=IF(ISBLANK(A2)+ISBLANK(B2)>0,0,SUM(A2:B2))
this works if both A and B are nonblank

What is it if either A or just B are nonblank?

If I understand this, you want the non-blank value only when the other one
is blank ?
=IF(ISBLANK(A2)+ISBLANK(B2)=1,SUM(A2:B2),0)
[/QUOTE]

Thanks for getting me a bit closer. It's actually this:
IF(ISBLANK(A2)+ISBLANK(B2)>0,SUM(A2:B2))

If I have a figure in just one, either col A or B.

thanks
 
Back
Top