SUMIF question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
Try:

=SUMPRODUCT((A1:A6="Front")*(B1:B6<0),B1:B6)

=SUMPRODUCT((A1:A6="Rear")*(B1:B6<0)*B1:B6)

--
HTH

Sandy
(e-mail address removed)
Replace@mailinator with @tiscali.co.uk
 
=sumproduct(--(A2:A100="front"),--(B2:B100<0),B2:B100)

--

HTH

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