Function countif with conditions

G

Gordon

I have a list of numbers (2000 lines). I need to count the numbers of
the values in different ranges. eg <= $10.00, $10.01 to $100.00,
$100.01 to $500.00, etc.

The formula =COUNTIF(H2:H2001,"<=10") works. It gives me 257.

But for the next range, formula
=COUNTIF(H2:H2001,AND(">10","<=100")) doesn't work.

What's the problem? How can I get this to work?


TIA
 
K

kk

Hi Gordon,

You can try...

=SUMPRODUCT(--(H2:H2001>10),--(H2:H2001<=100))




I have a list of numbers (2000 lines). I need to count the numbers of
the values in different ranges. eg <= $10.00, $10.01 to $100.00,
$100.01 to $500.00, etc.

The formula =COUNTIF(H2:H2001,"<=10") works. It gives me 257.

But for the next range, formula
=COUNTIF(H2:H2001,AND(">10","<=100")) doesn't work.

What's the problem? How can I get this to work?


TIA
 
Top