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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
=COUNTIF(range,">"&4)-COUNTIF(range,">"&17)

For example:

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

Regards

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

or

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

Regards
Ken.....................
 
Thanks all. BJ, your response was essentially correct except that the >
needs to be < in the second 'countif' expression.
 
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.
 

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

Back
Top