Counting numbers greater or less than a number

G

Guest

How can I count the total number of cells (around 2000 rows worth) that are
less than or equal to a set of numbers (i.e. >5 and <10)?

Have been using the COUNT and COUNTIF functions and summing them up but this
obviously takes all cases greater than 5 and ALL cases below 11 (and hence
below 5) which distorts the result??

Any ideas welcome!!

Cheers
 
G

Guest

You do it with 2 countifs and subtraction:-


=COUNTIF(A1:A10000,">5")-COUNTIF(A1:A10000,">11")

Mike
 
G

Guest

Oops,

I missed the equals bit so:-

=COUNTIF(A1:A10000,">=5")-COUNTIF(A1:A10000,">=11")

Mike
 
G

Guest

kippers said:
How can I count the total number of cells (around 2000 rows worth) that are
less than or equal to a set of numbers (i.e. >5 and <10)?

Another way

Assuming source data within A1:A2000

Placed in say, B1:
=SUMPRODUCT((A1:A2000>5)*(A1:A2000<10))

---
 

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