Counting values

J

Jouni

Hello,

I'm banging my head to the wall with the following simple problem.

I have loads of data in a range. The data contain values between 0 and
50. I want to count with one function the number of values between 20
and 50. I know I can use
=COUNTIF(E:E,20)+COUNTIF(E:E,21)+COUNTIF(E:E,22)+... but it's not very
handy. Are there any better ways of accomplishing the same? Naturally,
=COUNTIF(E:E,">20") does not do it as it searches for entries with
">20", and without quotes it is not even possible to enter the
function.

Thanks in advance,
Jouni
 
A

Art Farrell

Hi,

One way,

=SUMPRODUCT((E1:E65535>=20)*(E1:E65535<=50))

CHORDially,
Art Farrell
 
J

James

Hi,

One way you could use is to count all the values in the column then subtract
any values below 20 or above 50

=COUNTA(A2:A8)-SUM(IF(A2:A8<19,1,0))-SUM(IF(A2:A8>51,1,0))

J
 

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