Hookedonexcel,
First count the range greater than your number
=COUNTIF(A1:A2000, ">100")
Then count the ones greater than your second number
=COUNTIF(A1:A2000, ">1000")
Subtract
=COUNTIF(A1:A2000, ">100") - COUNTIF(A1:A2000, ">1000")
Gives 100 < A1:2000 <= 1000
If you want the range 100 <= X <= 1000 use:
=COUNTIF(A1:A2000,">=100") - COUNTIF(A1:A2000,">1000")
OR
=SUMPRODUCT((A1:A2000>=100)*(A1:A2000<=1000))
includes 100 and 1000
for 100 < X < 1000 use:
=COUNTIF(A1:A2000,">100") - COUNTIF(A1:A2000,">=1000")
OR
=SUMPRODUCT((A1:A2000>100)*(A1:A2000<1000))
excludes 100 and 1000
for 100 <= X < 1000
=COUNTIF(A1:A2000,">=100") - COUNTIF(A1:A2000,">=1000")
OR
=SUMPRODUCT((A1:A2000>=100)*(A1:A2000<1000))
for 100 < X <= 1000
=COUNTIF(A1:A2000,">100") - COUNTIF(A1:A2000,">1000")
OR
=SUMPRODUCT((A1:A2000>100)*(A1:A2000<=1000))
Dan E
hookedonexcel said:
I am trying to get a count of items (numbers) that fall in a range. Exactly, I have a list of 2,000 plus numbers. I want to
count those that are greater than one number but less than or equal to another number. Seems simple, but I haven't happened upon
the right expression yet. I have been trying it with a smaller subset of points to test it. No luck yet. Help!!