Any ideas how to determine what age group an individual belongs in Excel?

前端 未结 4 499
陌清茗
陌清茗 2021-01-28 01:40

I have 2 columns in an Excel spread sheet.

First column header is called AGE and the second column header is called Age_Group.

The ages in the AGE column are bet

4条回答
  •  萌比男神i
    2021-01-28 02:20

    Use a vlookup. Create a two column table with the lower bound of your age range in the first column and the age range as text in the second column like so:

    AGE_LOOKUP  AGE_GROUP
    18          18-24
    25          25-29
    30          30-35
    36          36-37 etc..
    

    Name this table's range as AGE_GROUP_TABLE then using the following formula to get the age group:

    VLOOKUP(A1, AGE_GROUP_TABLE, 2, TRUE)
    

    Put different ages into cell A1 and the formula will return the correct age group. The important thing to remember is to make sure that the last parameter of the VLOOKUP is set to TRUE, this makes the VLOOKUP find the nearest match.

提交回复
热议问题