sumif with 2 variables

D

Dave

i want to create a formulae to sum a range of numbers in a column providing
two conditions are met in other columns.

I can do it using SUMIF for one condition ie. SUMIF(A14:A401,R5,B14:B401)

but how do you add in a second criteria to also be met before the cells
B14:B401 are added

something like SUMIF(A14:A401,R5 and C14:C401,T6 then sum B14:B401)
 
B

Bob Phillips

=SUMPRODUCT(--(A14:A401=R5),--(C14:C401=T6),B14:B401)

If you have Excel 2007, you can use SUMIFS

=SUMIFS(B14:B401,A14:A401,R5,C14:C401,T6)
 
Top