count number of occurances between 2 values

P

Peters

I am trying to count how many cells contain a number within a certain range
eg number of cells in a column that are between 1000 and 2000.
I thought i could write it like =countif (A1:A4, >1000 <2000) doesn't work
for me
A
1000
4502
1203
2308
 
T

T. Valko

between 1000 and 2000.

Just so we understand...*between will exclude* from the count both 1000 and
2000.

=COUNTIF(A1:A4,">1000")-COUNTIF(A1:A4,">=2000")
 
S

smartin

Peters said:
I am trying to count how many cells contain a number within a certain range
eg number of cells in a column that are between 1000 and 2000.
I thought i could write it like =countif (A1:A4, >1000 <2000) doesn't work
for me
A
1000
4502
1203
2308

Try
=COUNTIF(A1:A4,">1000")-COUNTIF(A1:A4,">=2000")

N.B. "Between" usually implies an inclusive test, i.e., "1000 is between
1000 and 2000" is a true statement. If that is the case for you, try
this instead:
=COUNTIF(A1:A4,">=1000")-COUNTIF(A1:A4,">2000")
 

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