COUNTIF Function between 2 values

  • Thread starter Thread starter Donna
  • Start date Start date
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!
 
One of:

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

=SUMPRODUCT(--(Range>=Low),--(Range<=High))
 
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.
 
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().
 
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.
 
Back
Top