count function

C

ChrisC

How do I count the number of times a number is between two numbers?

range of cells is B5:B33
would like to know how many times a number shows up that is >124 but <150
 
M

Max

Try either:

=SUMPRODUCT((B5:B33>124)*(B5:B33<150))

or:

=COUNTIF(B5:B33,">"&124)-COUNTIF(B5:B33,">="&150)
 
K

Ken Wright

=COUNTIF(B5:B33,">"&124)-COUNTIF(B5:B33,">="&150)

No need for the '&' bits unless you putting in cell references in place of those
numbers

=COUNTIF(B5:B33,">124")-COUNTIF(B5:B33,">=150")
 
C

ChrisC

Thanks, this work great!

Ken Wright said:
No need for the '&' bits unless you putting in cell references in place of those
numbers

=COUNTIF(B5:B33,">124")-COUNTIF(B5:B33,">=150")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top