Add the number of people in a certain age group

  • Thread starter Thread starter Pam S.
  • Start date Start date
P

Pam S.

We have a document that list names and ages. We are
wanting to create a pie chart listing how many are
between 21-25, 26-30, etc. Does anyone know the formula
to have Excel search the age column and return how many
fell into the 26-30 category, for example? Thanks!
 
Assuming the ages are in A2:A500

=countif(A2:A500,">=21")-countif(A2:A500,">25")

for ages 21-25
 
Hi

Pie charts are best used for percentages, not how many's. Anyway, this would count persons
ages 26,27,28,29 and 30in range A1 to A200:

=SUMPRODUCT((A1:A200>=26)*(A1:A200<=30))
 
Just another general idea to make your pie chart. Make a Pivot table with
your age data. For the Data area, make it "Count Of Age".
Now, Right click in the pivot table and Group the data by 5 year increments.
Excel will automatically give category names of, for example "21-25",
"26-30", etc. Excel will automatically count how many fall in each
grouping. You can use these Category names in your Pie Chart. Again, just
an idea.
 
We have a document that list names and ages. We are
wanting to create a pie chart listing how many are
between 21-25, 26-30, etc. Does anyone know the formula
to have Excel search the age column and return how many
fell into the 26-30 category, for example? Thanks!

Take a look at the FREQUENCY worksheet function. You can set up bins and have
it return the number of folk in each range.


--ron
 
Back
Top