Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Grouping by Age

Status
Not open for further replies.

Llwynog

Technical User
Feb 12, 2004
22
GB
I've got a list (range) of ages from 30 to 64, and I want to group them from say 30 to 39, 40 to 49 etc.
I've tried SUMIF, and COUNTIF, but I'm getting stuck on how to get the IF bit of the argument e.g if (range)>30 and <40.
Any help would be gratefully received
Thanks and regards
 
You can use a Pivot Table and group the ages as you like
Cheers
 
or a VLOOKUP to a table with the age breaks in it:

Set up table like this:

0 30-39
40 40-49
50 50-59
60 60-64

formula would be:
=vlookup(A2,LookupRange,2,TRUE)

where your age is in A2 and you have NAMED your lookup table range "LookupRange"

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top