Using CountIf to get values between two values

  • Thread starter Thread starter THOMAS CONLON
  • Start date Start date
T

THOMAS CONLON

Can CountIf be used to get values between two values? All the examples use
criteria like ">30","<20", etc. How would you count values between 10 and
100, say? I tried a few guesses at syntax but none of them worked.
Thanks
tom
 
Use SUMPRODUCT:

=SUMPRODUCT((A1:A999>=10)*(A1:A999<100),B1:B999)

HTH
 
Cool, its a nice "trick". Too bad COUNTIF directly with an intuitive syntax
doesn't do it, but this works, so great! Thanks much!
tom
 
oops, i responded too fast. Didin't see the range b1:b999 in the argument.
What is in the B range? Assume the data that i want to count between 10 and
100 is in a1:a999.
Thanks
tom
 
=SUMIF(A:A,">=10")-SUMIF(A:A,">=100")

if you want to sum those numbers in the range,

=COUNTIF(A:A,">=10")-COUNTIF(A:A,">=100")

to count them

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)
 

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

Back
Top