Can I use SUMIF with < and >?

C

cursednomore

I have a worksheet with a price field and a cost field. I am trying to sum
the cost field with the condition that the value in the price field is
between two numbers, for example, 300 and 350. Is there a formula that will
aloow me to do that?
 
F

Frank Kabel

Hi
one way:
=SUMIF(A1:A100,">300",B1:B100)-SUMIF(A1:A100,">=350",B1:B100)

or
=SUMPRODUCT(--(A1:A100>300),--(A1:A100<350),B1:B100)
 
Top