Sum with two conditions

  • Thread starter Thread starter BannerBrat
  • Start date Start date
B

BannerBrat

I'm hoping someone can help me here.
I'm tring to sum column C if it equals B and equals A.
For example:
DF GF HG JK JP
Planes
Trains
Automobiles
------------------------------------------------------
A B C
Name Trans. Num
JP Planes 1
JP Trains 3
GF Automobiles 4
JP Planes 5
GF Trains 6
JK Automobiles 7
DF Planes 8
HG Trains 9
HG Automobiles 4
JP Planes 3
GF Trains 2
JK Automobiles 1
 
You can do this easily with a Pivot table

http://peltiertech.com/Excel/Pivots/pivotstart.htm

or you can use a formula like this, which assumes:

1) your data is in the range A10:C:30
2) you have the words Planes, Trains, etc in cells A2:A4
3) your codes DF, GH, etc are in cells B1:F1

=SUMPRODUCT(--(A10:A30=B$1),--(B10:B30=$A2),C10:c30)

copied through the range B2:F4
 

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

Back
Top