COUNTIF

  • Thread starter Thread starter Iris
  • Start date Start date
I

Iris

Hello,

I'm trying to use apply functions to perform a 2 step
process. For example:

Range

900
800
700
600
300
100

I want to apply COUNTIF the above range is >=300 and
<=800. Have tried several ways to slew this including:

=COUNTIF(AND(Range,">=300","<=800"))

Any help will be appreciated!

IW
 
Hi,

Try,

=COUNTIF(A1:A6,">=300")-COUNTIF(A1:A6,">800")

or, my preference,

=SUMPRODUCT(--(A1:A6>=300),--(A1:A6<=800))

Hope this helps!
 
Can anyone answer what purpose the double-dash (ie. "--")
serves within the SUMPRODUCT formula below?
Thanks in advance.
 
It works! Thanks!
-----Original Message-----
Hi,

Try,

=COUNTIF(A1:A6,">=300")-COUNTIF(A1:A6,">800")

or, my preference,

=SUMPRODUCT(--(A1:A6>=300),--(A1:A6<=800))

Hope this helps!


.
 
Tony said:
Can anyone answer what purpose the double-dash (ie. "--")
serves within the SUMPRODUCT formula below?
Thanks in advance.

It coerces the logical expressions, which result in TRUE or FALSE, into
their numerical equivalents of 1's and 0's, respectively. Sumproduct
can then carry out its function.

Hope this helps!.
 
Back
Top