Multiple conditions in a COUNTIF

A

AG

How do I do a set up the fcn to count all cells in a range that are >0% and
<25%?

Hi John,
Try using this: SUMPRODUCT((cellrange>0)*1,(cellrange<0.25)*1)
Regards,
-AG
 
B

Bob Phillips

=COUNTIF(A:A,">0")-COUNTIF(A1:A20,">=.25")

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
B

Bob Phillips

That was meant to be

=COUNTIF(A:A,">0")-COUNTIF(A:A,">=.25")


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
C

Catenary

Bob Phillips said:
=COUNTIF(A:A,">0")-COUNTIF(A:A,">=.25")
This won't do the trick. It subtracts the count of all values less than
0.25 from the count of all values greater than 0. It's not the same as the
number of all values between 0 and 0.25.

I've tried

=COUNTIF(A:A, AND(">0","<0.25))

but that returns 0 since it is evaluating whether a value is "TRUE".
 
T

T. Valko

=COUNTIF(A:A,">0")-COUNTIF(A:A,">=.25")
This won't do the trick It subtracts the count of all
values less than 0.25 from the count of all values
greater than 0. It's not the same as the number of
all values between 0 and 0.25.

No, it literally counts all values **between** 0 and 0.25.

It counts all numbers >0 then subtracts the count of all numbers >=0.25.

So, the range is in essence (out to 15 decimal places):

0.000000000000001
0.249999999999999
 

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