Sumif based on multiple conditions


Posted by Sandra on December 07, 2001 1:12 PM

I don't have the conditional sum wizard but want to write a formula that will sum only those cells that meet certain criteria. Example:

Sumif(D:D,20 AND C:C,<12,B:B)

In this case if the value if column D is 20 and the value in column C is less than 12, sum.

Is there a way to write a formula to do this?



Posted by Aladin Akyurek on December 07, 2001 1:35 PM

Sandra --

SUMIF cannot be used in case of multiple conditions. Use instead:

=SUMPRODUCT((D1:D100=20)*(C1:C100 < 12),(D1:D100))

Adjust the ranges to your situation. SUMPRODUCT cannot be given the whole columns as arguments. If you'd insist having B:B, etc., let me know.

Aladin