SUMIF with multiple conditions

J

Johan

Month Reason Value
1 Overcharge$2.34
1 Broken $3.12
2 Overcharge$4.50
2 Broken $3.33
4 Returned $1.34
1 Overcharge$4.50
2 Broken $2.30
1 Returned $5.20

I want to sum all the values for month 1 (January) which were a result of
overcharges, broken etc. and so on for all month. That is if a condition is
column A AND a condition in column B are met, all the values corresponding in
column C must be added.

I tried a number of variations of IF and SUMIF combinations to do this e.g.

=IF(CMSO6304!$E$2:$E$804="Overcharge",SUMIF(CMSO6304!$J$2:$J$804,"=1",CMSO6304!$D$2:$D$804),)

Anybody have an idea?
 
B

Bob Phillips

=SUMPRODUCT(--(A2:A20=1),--(B2:B20="Overcharge"),C2:C20)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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