ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Can I use SUMIF with < and >? (https://www.excelbanter.com/excel-worksheet-functions/5260-can-i-use-sumif-%3C-%3E.html)

cursednomore

Can I use SUMIF with < and >?
 
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?

Frank Kabel

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

or
=SUMPRODUCT(--(A1:A100300),--(A1:A100<350),B1:B100)

--
Regards
Frank Kabel
Frankfurt, Germany

"cursednomore" schrieb im
Newsbeitrag ...
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?




All times are GMT +1. The time now is 05:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com