Sumif for multiple conditions

D

DMcCormack

Do anyone know if it is possible to do a sumif function for more than one
condition? What I want to do is sum the items in column C that meet the
criteria of column A = "ABC" and column B = "XYZ"

Can anyone help?

Thanks in advance
 
P

Peo Sjoblom

One way

=SUMPRODUCT(--(A2:A5000="ABC"),--(B2:B5000="XYZ"),C2:C5000)


will do what you want, note that you need to specify the range sizes and
they need to have the same dimensions
in this setup. Also a good policy would be to replace the hardcoded "ABC"
and "XYZ" with cells where instead of changing the formula itself you only
need to change the criteria in those cells

--


Regards,


Peo Sjoblom
 
P

Pete_UK

You can do it this way:

=SUMPRODUCT((A1:A100="ABC")*(B1:B100="XYZ")*(C1:C100))

Hope this helps.

Pete
 
L

~L

Assuming you have column headers in row 1 and the data does not exceed row
5000:

=SUMPRODUCT(--($A$2:$A$5000="ABC"),--($B$2:$B$5000="XYZ"),$C$2:$C$5000)
 

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