ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Find value grater than X but less than Y (https://www.excelbanter.com/excel-worksheet-functions/73119-find-value-grater-than-x-but-less-than-y.html)

John Murf

Find value grater than X but less than Y
 
What formulea do I use to find a the number of cells with a value greater
than 20 but less than 30 in a range of cells B2:B32 in Excel 2002
Countif(B2:B32,"<=30")- countif(B2:B32,"<=19")
Is there an easier way to write this?
Can the lower and upper limits be set in refrence cells? say H20 and H21

Bob Phillips

Find value grater than X but less than Y
 
Not much easier, but

=SUMPRODUCT(--(B2:B3220),--(B2:B32<=30))

or

=SUMPRODUCT(--(B2:B32=H20),--(B2:b32<=H21))

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"John Murf" <John wrote in message
...
What formulea do I use to find a the number of cells with a value greater
than 20 but less than 30 in a range of cells B2:B32 in Excel 2002
Countif(B2:B32,"<=30")- countif(B2:B32,"<=19")
Is there an easier way to write this?
Can the lower and upper limits be set in refrence cells? say H20 and H21





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

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