Counting number of instances in a range

S

SSM

My worksheet is like this:
A1 A2...
120 210 333 400 510 625 789 801 ...10000

How can I get the how many of the cells the cells have a value between 0 and
400 (in the question above 4), how many times the cells have a value between
401 and 800 (3), etc.?

Thanks in advance...

Regards,
SSM
 
T

Toppers

=COUNTIF(B1:B8,"<=400") (assuming all numbers are positive)

=COUNTIF(B1:B8,">=401")-COUNTIF(B1:B8,">800")

HTH
 
R

Ron Coderre

Here's one (somewhat non-standard) way:

0-400:
=SUM((COUNTIF(A1:A10,{">=0",">400"})*{1,-1}))

401-800:
=SUM((COUNTIF(A1:A10,{">=401",">800"})*{1,-1}))



Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP
 
Top