count how many between two values

J

Jeremy H

I am trying to count the number of entries in a column that are BETWEEN -20
and 20. Everything I have tried returns a zero or a wrong value because it
is counting everything ( such as -50 is less than 20 so it counts it, and 50
is more than -20 so it counts it) Any ideas?
 
F

Frank Kabel

Hi
one way:
=COUNTIF(A:A,">10")-COUNTIF(A:A,">=20")
counts everything between 10 and 20

or use
=SUMPRODUCT(--(A1:A100>10),--(A1:A100<20))
 
J

Jeremy H

Thank you very much,
That countif formula worked perfectly, and I really appreciate it.
 

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