Conditional Sum

M

Mike

Hi everone,

Say I have this:
A B C
1 a1 9
1 a2 10
1 a3 11
1 a1 12
1 a3 13
1 a3 14
2 a1 15
2 a2 16
2 a1 17
2 a2 18
2 a3 19

I want the sum of C values for each value of (A and B). For example,
A=1, B=a3, then C=11+13+14=38. Smart formula to do this please?

Thanks,
Mike
 
H

Harald Staff

Hi Mike

Use a pivot table for this, don't fiddle with formulas. Faster, safer, more
fun, more power.

Best wishes Harald
 
J

joeu2004

I want the sum of C values for each value of (A and B).
For example, A=1, B=a3, then C=11+13+14=38.

Depends on what version of Excel you have.

For XL2007 and later:

=SUMIFS(C1:C100,A1:A100,1,B1:B100,"a3")

For XL2003 and earlier:

=SUMPRODUCT((A1:A100=1)*(B1:B100="a3"),C1:C100)
 

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