Age grouping

shaniwafa

New Member
Joined
Sep 7, 2018
Messages
10
Hi,
I have stuck up while trying to create a formula in my family forum database work sheet, which has a DOB column in C5 to get age in D5. There is one more column to segregate different age group in E5. If I wish to add one more column for gender to get result by considering new column, how the existing formula need to edit if I choose 3 more age group for female as CAT-5, CAT-6, CAT-7.
Formula currently used in the sheet


[FONT=Helvetica Neue, Helvetica, Arial, sans-serif]INT(YEARFRAC(C5,TODAY())) - for age

[FONT=Helvetica Neue, Helvetica, Arial, sans-serif]
[/FONT]

[FONT=Helvetica Neue, Helvetica, Arial, sans-serif]LOOKUP(D5,{0;6;15;40},{"CAT-1"<wbr>;"CAT-2";"CAT-3";"CAT-4"}) - for age group
[/FONT]

[FONT=Helvetica Neue, Helvetica, Arial, sans-serif][/FONT]
Hope someone can suggest an easy approach to achieve this result.
Any help would be greatly appreciated
Regards

Shaniwafa
[/FONT]
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Hi,

Try this : ("F" for female)

=IF(F5="M",LOOKUP(D5,{0;6;15;40},{"CAT-1";"CAT-2";"CAT-3";"CAT-4"}),LOOKUP(D5,{0;6;15;40},{"CAT-5";"CAT-6";"CAT-7";"CAT-8"}))
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top