Display age range and age based on date entered and actual calendar date.

RodneyW

Active Member
Joined
Sep 24, 2010
Messages
475
Office Version
  1. 2013
Platform
  1. Windows
If a column has a date, in this format dd.mm.yyyy is there a formula that will produce their age range in another column and their specific age in yet another.

For example, cell M10 has the date, let's say it's 5.4.1999. I'd like N10 to show 18-24 and O10 to show 24. Then when the calendar moves to 5.4.2024, the day of the person's birthday, I'd like N10 to change to 25-34 and O10 to change to 25.

Age ranges I need are 18-24, 25-34, 35-44, 45-54, 55-64 and 65+.

Thanks in advance.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Perhaps something like this (my date values are mm-dd-yyyy, and col O formatted as General because Excel likes to convert to date):

Book1
MNOPQR
9RangeAgeLookup Table
105/3/199918-24241818-24
115/2/199925-34252525-34
125/3/198925-34343535-44
135/2/198935-44354545-54
145/3/197935-44445555-64
155/2/197945-54456565+
165/3/196945-5454
175/2/196955-6455
185/3/195955-6464
195/2/195965+65
205/3/194965+74
215/2/194965+75
Sheet1
Cell Formulas
RangeFormula
N10:N21N10=LOOKUP(INT((TODAY()-M10)/365.25),$Q$10:$Q$15,$R$10:$R$15)
O10:O21O10=INT((TODAY()-M10)/365.25)
 
Upvote 0
Perhaps something like this (my date values are mm-dd-yyyy, and col O formatted as General because Excel likes to convert to date):

Book1
MNOPQR
9RangeAgeLookup Table
105/3/199918-24241818-24
115/2/199925-34252525-34
125/3/198925-34343535-44
135/2/198935-44354545-54
145/3/197935-44445555-64
155/2/197945-54456565+
165/3/196945-5454
175/2/196955-6455
185/3/195955-6464
195/2/195965+65
205/3/194965+74
215/2/194965+75
Sheet1
Cell Formulas
RangeFormula
N10:N21N10=LOOKUP(INT((TODAY()-M10)/365.25),$Q$10:$Q$15,$R$10:$R$15)
O10:O21O10=INT((TODAY()-M10)/365.25)
Thank you, this is great and we're very close. In some case, column M is empty. When that is the situation, columns N and O should be empty. I've tried this:

=IFERROR(LOOKUP(INT((TODAY()-M11)/365.25),$Q$10:$Q$15,$R$10:$R$15),"")
and
=IFERROR(INT((TODAY()-M11)/365.25),"")

which produce values of 65+ in column N and 124 in column O

How can I modify so that the result is an empty cell if M is empty?
 
Upvote 0
Dates Time.xlsb
MNOPQR
7
8Today02-May-24
9RangeAgeLookup Table
1005-Mar-9925-34251818-24
1105-Feb-9925-34252525-34
1205-Mar-8935-44353535-44
1305-Feb-8935-44354545-54
1405-Mar-7945-54455555-64
1505-Feb-7945-54456565+
1605-Mar-6955-6455
1705-Feb-6955-6455
1805-Mar-5965+65
1905-Feb-5965+65
20  
2105-Feb-4965+75
5d
Cell Formulas
RangeFormula
N10:N21N10=IF(M10,LOOKUP(O10,$Q$10:$R$15),"")
O10:O21O10=IF(M10,DATEDIF(M10,$N$8,"y"),"")
 
Upvote 0

Forum statistics

Threads
1,223,948
Messages
6,175,579
Members
452,652
Latest member
eduedu

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