Link to home
Start Free TrialLog in
Avatar of Edward Pamias
Edward PamiasFlag for United States of America

asked on

Countif questions

I want to know  If  I can use COUNTIF on a range of numbers? for example I need a count for

1 and 2 together as well as the following....

3, 4 and 5

6 thru 10

and anything over 11.

Currently I can only look up 1 number in a range... this is what I got so far.  =COUNTIF(N15:N31,Q15)

For Example I would like to count 3,4,5, together which = 15 (see below)  6 thru 10 = 1 since there isn't 1 or 2 that would = 0

6
5
5
5
5
4
4
4
4
4
4
4
4
4
4
3

Thanks in advance for your assistance!
Avatar of nutsch
nutsch
Flag of United States of America image

You can do

 =COUNTIF(N15:N31,1)+COUNTIFS(N15:N31,2)
=COUNTIFS(N15:N31,">=3",N15:N31",<=5")
=COUNTIFS(N15:N31,">=6",N15:N31",<=10")

Does that answer your question?

Thomas
Avatar of Edward Pamias

ASKER

=COUNTIF(N15:N31,1)+COUNTIFS(N15:N31,2)   <----this one works
The others did not work. Possible typos?
I assume you're using excel 2003 or earlier? Then use these formulas instead

 =COUNTIF(N15:N31,">=3")-COUNTIFS(N15:N31,">5")
 =COUNTIF(N15:N31,">=6")-COUNTIFS(N15:N31,">10")

Thomas
No sorry, I am using excel 2010.
ASKER CERTIFIED SOLUTION
Avatar of nutsch
nutsch
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you!
Glad to help. Thanks for your patience.

Thomas