Count of Ages

  • Thread starter Thread starter Glenis
  • Start date Start date
G

Glenis

Hi

Can someone help me please
I have a long list of ages ranging between 0 and 20 which I need to separate
into
0-5
6-11
12-15
16+
I have been trying to do it with countif but it isn't coming back to the
total numbers, so don't know where I am going wrong.

Many thanks

Glenis
 
Glenis,
try this...

Col-A Col-B
Name Age
name0 0
name1 1
name2 2
name3 3
name4 4
name5 5
name6 6
name7 7
name8 8
name9 9
name10 10
name11 11
name12 12
name13 13
name14 14
name15 15
name16 16
name17 17
name18 18
name19 19
name20 20

0-5 =COUNTIF(B2:B22,">=0")-COUNTIF(B2:B22,">5")
6-11 =COUNTIF(B2:B22,">=6")-COUNTIF(B2:B22,">11")
12-15 =COUNTIF(B2:B22,">=12")-COUNTIF(B2:B22,">15")
16+ =COUNTIF(B2:B22,">=16")


hope this helps.
-kc
*Click YES if this helps
 
Glenis,
This is what I did:
Column A1 thru A9
"Ages, 0, 3, 5, 7, 11, 15, 19, 20"
This represents the list of ages of people.
Column B1 thru B9
"# of People, 3, 2, 5, 6, 8, 14, 19, 20"
This represents the number of people with the age in column A.
Columns C1, D1,E1 F1
Formated to text, with "0-5, 6-11, 12-15, 16+"
In Cell C2:
"=SUMIF(A2:A9,"<5",B2:B9)"
In Cell D2:
"=SUM(SUMIF(A2:A9, "<12",B2:B9)-C2)"
In Cell E2:
"=SUM(SUMIF(A2:A9,"<16",B2:B9)-D2-C2)"
In Cell F2:
"=SUMIF(A2:A9,">16",B2:B9)"

Ages # of People 0-5 6-11 12-15 16+
0 3 5 19 14 8
3 2
5 5
7 6
11 8
15 14
19 6
20 2

hth
 
Hi

Theese four formulas should do it:

=COUNTIF(A2:A28,"<=5")
=COUNTIF($A$2:$A$28,"<=11")-COUNTIF($A$2:$A$28,"<6")
=COUNTIF($A$2:$A$28,"<=15")-COUNTIF($A$2:$A$28,"<12")
=COUNTIF(A2:A28,">=16")

Regards,
Per
 
Hi

I had the same as you and it makes perfect sense, but the figures don't come
back to the total number of children.
I have also tried adding "=" to the second Countif but that didn't work. I
then tried
putting < (less than) on the second countif but that also didn't work.
Any ideas?
 
I've done it!!
Because we haven't got = on the second countif it isn't picking up the 5 so
I have changed it to 6 and so on and it now works.

Many thanks for helping me figure out what I was doing wrong.

Regards

Glenis
 
Back
Top