sumif to add more than one column of cells.

3

3Suk

dear all,
I have a table below :
Col
Row A B C
1 X 1 2
2 Y 3 4
3 Z 5 6

Then, I have a formula in D1 below, but it only returns "1" as the result, which I expect to be "3" (1+2), please help.

=SUMIF(A:A,"X",B:C)

Thanks,
Patrick.
 
L

lhkittle

dear all,

I have a table below :

Col

Row A B C

1 X 1 2

2 Y 3 4

3 Z 5 6



Then, I have a formula in D1 below, but it only returns "1" as the result, which I expect to be "3" (1+2), please help.



=SUMIF(A:A,"X",B:C)



Thanks,

Patrick.

Hi Patrick,

Try:

=SUM(IF(A:A="X",B1+C1,""))

Regards,
Howard
 
C

Claus Busch

Hi Patrick,

Am Sun, 3 Feb 2013 19:12:14 -0800 (PST) schrieb 3Suk:
dear all,
I have a table below :
Col
Row A B C
1 X 1 2
2 Y 3 4
3 Z 5 6

Then, I have a formula in D1 below, but it only returns "1" as the result, which I expect to be "3" (1+2), please help.

=SUMIF(A:A,"X",B:C)

try:
=SUM(IF((A1:A100="X"),B1:C100))
and enter the array formula with CTRL+Shift+Enter


Regards
Claus Busch
 
L

lhkittle

Hi Patrick,



Try:



=SUM(IF(A:A="X",B1+C1,""))



Regards,

Howard

Hi Patrick,
Claus has given you a proper formula. Upon advice I have since gotten, discard mine as it a bit bush-league and use his or maybe this.

=IF(A1="X",B1+C1,0)

Regards,
Howard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top