get a count of numbers whose value falls within a given range

L

LyleB_Austin

I have a series of numbers in a column. What I want to do is find out how
many of the numbers fall within a given range. For example, let's say I have
20 random numbers. I want to find out how many of the 20 are >4 and <=17.
 
T

Trevor Shuttleworth

=COUNTIF(range,">"&4)-COUNTIF(range,">"&17)

For example:

=COUNTIF(C24:C29,">"&2)-COUNTIF(C24:C29,">"&5)

Regards

Trevor
 
K

Ken Wright

=countif(A1:A100,">4)-countif(A1:A100,">17)

or

=SUMPRODUCT(--(A1:A100>4),--(A1:A100<=17))

Regards
Ken.....................
 
L

LyleB_Austin

Thanks all. BJ, your response was essentially correct except that the >
needs to be < in the second 'countif' expression.
 
B

bj

actually <=
I'm glad you caught it.

LyleB_Austin said:
Thanks all. BJ, your response was essentially correct except that the >
needs to be < in the second 'countif' expression.
 
Top