SUMIF with multiple criteria

G

Guest

Does anyone know how to do a SUMIF which will allow you to enter two ranges
which apply to two sets of criteria? For example, I have the following data,
and I would like to write a formula that will sum for me the red Ds only.
(answer = 3)

colour letter amount
red F 3
orange D 5
yellow B 4
purple E 2
red D 3
orange B 5
yellow E 4
purple F 2

I normally write this in two steps, but I wonder if it is possible to do it
all in one formula?
 
G

Guest

Use SUMPRODUCT:

=SUMPRODUCT(--(A1:A8="red"),--(B1:B8="D")*(C1:C8))

you can use it for many criteria
 
D

Dana DeLouis

Does anyone know how to do a SUMIF...
which apply to two sets of criteria?

Hi. If using range names in Excel 2007...

=SUMIFS(Number,Color,"Red",Letter,"D")
 

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