March 3, 2010

Counting cells with values between two ranges.

If we have a larger data base and we would like to count the values between two ranges. I.e. values between 500 and 1000.



In the above example we calculated the count of values which are more than 500 and not more than 1000. The values we looked are 500,938&1000. The above formula =COUNTIF(A1:A10,">=500")-COUNTIF(A1:A10,">1000") works in two ways.

1st it would take the count of values which are greater than or equal to 500, in the above table we have 6 values which are greater than 500. 2nd it would look for the values greater than 1000 (3 values). Note it would not consider the 1000, since it is not greater than 1000. Finally, the answer is 3 (6-3).

No comments:

Post a Comment