Sumif with 2 conditions

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

Guest

I have a spreadsheet with 3 columns:

A Blue 250
B Blue 100
B Blue 300
C Red 500
A Red 200
A Blue 50

How could I use sumif to calculate all the A and blue in one cell and A and
red in another cell. I do not want to use pivot tables.

Thanks
 
Assume data in A1:C6

List the letters across in F1, G1,... : A, B, C
List the colours in E2 down: Blue, Red

Then put in F2:
=SUMPRODUCT(($A$1:$A$100=$F$1)*($B$1:$B$100=$E2),$C$1:$C$100)

Copy F2 across and fill down to populate the grid

Adapt the ranges to suit

Note that we can't use entire col refs in SUMPRODUCT
 
Back
Top