SUMIF question

D

Duncan Help

I would like to sum only negatives in one column conditionally on another
column.

A B
front 10
front -5
front 15
rear 20
rear 25
rear -10

So, if I was summing front, then my answer would be -5, and if I was summing
rear my answer would be -10.
 
B

Bob Phillips

=sumproduct(--(A2:A100="front"),--(B2:B100<0),B2:B100)

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Top