COUNTIF

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
 
D

Domenic

Hi,

Try,

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

or, my preference,

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

Hope this helps!
 
T

Tony

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

Iris

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!


.
 
D

Domenic

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!.
 
Top