Calculating vacation entitlement and prorated amounts

Chrissy1911

New Member
Joined
Apr 12, 2023
Messages
8
Office Version
  1. 365
Platform
  1. Windows
I need to calculate vacation with the following parameters:
0-6 years 15 days
7-19 years 20 days
20 + years 25 days

On Jan 1 each year the entitlement based on years of service is awarded for the current year, for example Jan 1/2023 you have 15 days in your accrual to use in 2023. Your first year worked is pro-rated based on start date.

I would like to know how much each employee has accrued at todays date from Jan 1 based on their entitlement.

Thanks,
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
I had start dates in Column C. You will want to adjust for your spreadsheet, but this seems to work:
Excel Formula:
=IFS((YEAR(TODAY())-YEAR(C2)-1)<1,ROUND(YEARFRAC(DATE(YEAR(TODAY()),12,31),C2)*15,0),(YEAR(TODAY())-YEAR(C2)-1)<6,15,(YEAR(TODAY())-YEAR(C2)-1)<20,20,TRUE,25)
.
You may choose to ROUNDDOWN instead of ROUND for the current year depending on how you want to deal with fractions.
 
Upvote 0
I had start dates in Column C. You will want to adjust for your spreadsheet, but this seems to work:
Excel Formula:
=IFS((YEAR(TODAY())-YEAR(C2)-1)<1,ROUND(YEARFRAC(DATE(YEAR(TODAY()),12,31),C2)*15,0),(YEAR(TODAY())-YEAR(C2)-1)<6,15,(YEAR(TODAY())-YEAR(C2)-1)<20,20,TRUE,25)
.
You may choose to ROUNDDOWN instead of ROUND for the current year depending on how you want to deal with fractions.
Thank you very much, this returns just 15, 20 or 25 which is what I need in 1 column so I know but I was looking for a formula that would give me what they've accrued from Jan 1/23 to date just in case they left throughout the year then I would have an up to date accrual.
 
Upvote 0
Sorry, I misunderstood and gave you prorated days for Year 1 depending on starting date, but not accrued days this year.
If you already have the column with the correct number of days per year, this equation could be simplified. But just in case you don't, the whole thing with rounding would be:
Excel Formula:
=ROUND(IFS((YEAR(TODAY())-YEAR(C2)-1)<1,ROUND(YEARFRAC(DATE(YEAR(TODAY()),12,31),C2)*15,0),(YEAR(TODAY())-YEAR(C2)-1)<6,15,(YEAR(TODAY())-YEAR(C2)-1)<20,20,TRUE,25)*YEARFRAC(DATE(YEAR(TODAY()),1,1),TODAY()),0)

Remember to change C2 to your start date location and adjust the rounding depending on the results you need (you may need roundup or rounddown instead of round).
 
Upvote 0
Hi.
If the start date is in cell A2 and you are calculating aging from 1/1/2023, the following may help:

Excel Formula:
=INDEX( {25;20;15}, MATCH( A2, EDATE("2023/1/1", -{600;240;84} ) ) )
 
Upvote 0
And you can also try:
Excel Formula:
=INDEX( {25,20,15}, MATCH( A2, EDATE("2023/1/1", -{600,240,84} ) ) )
 
Upvote 0
Sorry, I misunderstood and gave you prorated days for Year 1 depending on starting date, but not accrued days this year.
If you already have the column with the correct number of days per year, this equation could be simplified. But just in case you don't, the whole thing with rounding would be:
Excel Formula:
=ROUND(IFS((YEAR(TODAY())-YEAR(C2)-1)<1,ROUND(YEARFRAC(DATE(YEAR(TODAY()),12,31),C2)*15,0),(YEAR(TODAY())-YEAR(C2)-1)<6,15,(YEAR(TODAY())-YEAR(C2)-1)<20,20,TRUE,25)*YEARFRAC(DATE(YEAR(TODAY()),1,1),TODAY()),0)

Remember to change C2 to your start date location and adjust the rounding depending on the results you need (you may need roundup or rounddown instead of round).
Good Morning, this formula seems to work with rounding, thank you so much :) I'm no good when the formulas need to be this complicated so I appreciate your help. How can I remove the rounding and see the exact number? I tried to read the formula and remove the round but I kept getting errors.
 
Upvote 0
Chrissy1911:

Did you try what was suggested in post #5 or #6?...
 
Upvote 0
I found a mistake when doing some testing that blew up any start dates in 2022 or 2023. Below are the corrected versions.
Without rounding:
Excel Formula:
=IFS((YEAR(TODAY())-YEAR(C2))<1,ROUND(YEARFRAC(DATE(YEAR(TODAY()),12,31),C2)*15*(TODAY()-C2)/(DATE(YEAR(TODAY()),12,31)-C2),0),(YEAR(TODAY())-YEAR(C2)-1)<6,15*YEARFRAC(DATE(YEAR(TODAY()),1,1),TODAY()),(YEAR(TODAY())-YEAR(C2)-1)<20,20*YEARFRAC(DATE(YEAR(TODAY()),1,1),TODAY()),TRUE,25*YEARFRAC(DATE(YEAR(TODAY()),1,1),TODAY()))
With rounding:
Excel Formula:
=ROUND(IFS((YEAR(TODAY())-YEAR(C2))<1,ROUND(YEARFRAC(DATE(YEAR(TODAY()),12,31),C2)*15*(TODAY()-C2)/(DATE(YEAR(TODAY()),12,31)-C2),0),(YEAR(TODAY())-YEAR(C2)-1)<6,15*YEARFRAC(DATE(YEAR(TODAY()),1,1),TODAY()),(YEAR(TODAY())-YEAR(C2)-1)<20,20*YEARFRAC(DATE(YEAR(TODAY()),1,1),TODAY()),TRUE,25*YEARFRAC(DATE(YEAR(TODAY()),1,1),TODAY())),0)
 
Upvote 0
I found a mistake when doing some testing that blew up any start dates in 2022 or 2023. Below are the corrected versions.
Without rounding:
Excel Formula:
=IFS((YEAR(TODAY())-YEAR(C2))<1,ROUND(YEARFRAC(DATE(YEAR(TODAY()),12,31),C2)*15*(TODAY()-C2)/(DATE(YEAR(TODAY()),12,31)-C2),0),(YEAR(TODAY())-YEAR(C2)-1)<6,15*YEARFRAC(DATE(YEAR(TODAY()),1,1),TODAY()),(YEAR(TODAY())-YEAR(C2)-1)<20,20*YEARFRAC(DATE(YEAR(TODAY()),1,1),TODAY()),TRUE,25*YEARFRAC(DATE(YEAR(TODAY()),1,1),TODAY()))
With rounding:
Excel Formula:
=ROUND(IFS((YEAR(TODAY())-YEAR(C2))<1,ROUND(YEARFRAC(DATE(YEAR(TODAY()),12,31),C2)*15*(TODAY()-C2)/(DATE(YEAR(TODAY()),12,31)-C2),0),(YEAR(TODAY())-YEAR(C2)-1)<6,15*YEARFRAC(DATE(YEAR(TODAY()),1,1),TODAY()),(YEAR(TODAY())-YEAR(C2)-1)<20,20*YEARFRAC(DATE(YEAR(TODAY()),1,1),TODAY()),TRUE,25*YEARFRAC(DATE(YEAR(TODAY()),1,1),TODAY())),0)
Thank you so much, it's calculating 4.25 days for the 15 day people, 5.67 for the 20 day people and 5.67 for the 25 day people but the 25 day people should be 7.??. Again, I tried to read the formula and see if there was a quick change where maybe something was keyed as 20 instead of 25 but I was lost. I also didn't want to mess up what you already had there because most of it is resulting in exactly what I need. Is it a quick fix that I can do?
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

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