COUNTIF Function between 2 values

D

Donna

I can get the COUNTIF function to work for greater than or
less than a value, but cannot figure out the syntax to
COUNTIF values are between a certain RANGE. Help!
 
A

Aladin Akyurek

One of:

=COUNTIF(Range>=Low)-COUNTIF(Range>High)

=SUMPRODUCT(--(Range>=Low),--(Range<=High))
 
D

Dave R.

A common solution for this is to countif the first bound then subtract the
other bound, leaving you what's inbetween them, like;

countif(a1:a100,">100")-countif(a1:a100,"<150")

will count numbers from a1-a100 that are from 101 through 149.
 
J

J.E. McGimpsey

Two ways:

Say you want to count values in Column A between 50 and 100,
inclusive (i.e., entries of 50 and 100 would both be counted).

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

or

=SUMPRODUCT(--(A1:A65535>=50),--(A1:A65535 <=100))

(you can't use entire columns in Sumproduct().
 
D

Dave R.

Whoops, make that 101 through 150.


Dave R. said:
A common solution for this is to countif the first bound then subtract the
other bound, leaving you what's inbetween them, like;

countif(a1:a100,">100")-countif(a1:a100,"<150")

will count numbers from a1-a100 that are from 101 through 149.
 

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