Age between a start date and now()

dannyok90

Board Regular
Joined
Aug 30, 2016
Messages
115
Hi All,

How could i work out how many years between a job start date and now() a person was:


- under the age of 22
- over 22 but under 41
- over 41


I've worked out the persons age from their DOB but my brain is frazzled trying to work the rest out!!


Any help appreciated as always :)


Dan
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
I am not sure I undersrtand what you are after.
Why would a person's current age have any bearing on the time elapsed between Job Start Date and Now?
 
Upvote 0
I am not sure I undersrtand what you are after.
Why would a person's current age have any bearing on the time elapsed between Job Start Date and Now?

Hi Joe
So, in the UK (not sure if you're from the UK) if you are made redundant (not needed any more) from work there are pay bands.

- for every year you worked for the business that you were under the age of 22 you get half your weeks pay
- for every year you worked for the business between the ages of 22 and 41 you get a full weeks pay
- for every year you worked for the business that you were over the age of 41 you get a week and a halfs pay

so i need to figure out how many years a person sat in these bands from the date they started employment to the date they were made redundant
somebody could be 65 and have worked at the business since being 16 and hence giving him:



- 6 years under 22
- 19 years between 22 and 41
- 24 years over 41


its trying to work out the formula to band that, if you follow?
Thanks,
Dan
 
Upvote 0
OK. So what cells are all these different dates stored in?
And can you post the age formula that you are using now?
 
Upvote 0
OK. So what cells are all these different dates stored in?
And can you post the age formula that you are using now?

So the employment start date would be in a1
The employment end date in a2
The persons date of birth in a3
And the formula for working out the persons age from there date of birth is in a4

A4 is =DATEDIF(A3,NOW(),"y")
 
Upvote 0
I do not know how you account for partial years, so these formulas may need a little tweaking, but these should give you a good spot to start from.
I am calculating the 22-41 and over 41 ranges, then subtracting these values from total service to get the under 22 years.

So here are my formulas:
- Under 22 in cell A5: =DATEDIF(A1,A2,"y")-A6-A7
- Between 22 and 41 in cell A6: =MAX(MIN(41,DATEDIF(A3,A2,"y"))-MAX(22,DATEDIF(A3,A1,"y")),0)
- Over 41 in cell A7: =MAX(DATEDIF(A3,A2,"y")-41,0)
 
Last edited:
Upvote 0
I do not know how you account for partial years, so these formulas may need a little tweaking, but these should give you a good spot to start from.
I am calculating the 22-41 and over 41 ranges, then subtracting these values from total service to get the under 22 years.

So here are my formulas:
- Under 22 in cell A5: =DATEDIF(A1,A2,"y")-A6-A7
- Between 22 and 41 in cell A6: =MAX(MIN(41,DATEDIF(A3,A2,"y"))-MAX(22,DATEDIF(A3,A1,"y")),0)
- Over 41 in cell A7: =MAX(DATEDIF(A3,A2,"y")-41,0)

I don't need to account for partial years. just whole years for the purpose of this exercise.

this is absolutely fantastic. thanks for your help!
 
Upvote 0

Forum statistics

Threads
1,215,391
Messages
6,124,673
Members
449,178
Latest member
Emilou

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