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

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