• Status: Solved
• Priority: Medium
• Security: Public
• Views: 404

# 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

0
Edward Pamias
• 4
• 3
1 Solution

Commented:
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")

Thomas
0

Author Commented:
=COUNTIF(N15:N31,1)+COUNTIFS(N15:N31,2)   <----this one works
The others did not work. Possible typos?
0

Commented:
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
0

Author Commented:
No sorry, I am using excel 2010.
0

Commented:
so then, definitely typos (placement of double quotes for the last criteria)

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

Thomas
0

Author Commented:
Thank you!
0

Commented: