How to calculate vacation accrual based on 5 days every 5 years

demtro

New Member
Joined
Jul 24, 2011
Messages
2
I just watched the Youtube Excel Magic Trick #202 for calculating vacation days. This is a great starting point for me. However my company starts you out with 10 days, after 5 years you get 5 more days, and after 10 years you get 5 more days, 15 5 more days for a cap of 25 days. I need some help modifying the formula to calculate vacation based on year of hire, current, year, and accumulation of those additional 5 days for each 5 year increment up to a cap of 25....I tried playing with the formula, but cant figure it out. Not a math wiz, so any help is appreciated.

thanks
Demtro
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Book1
ABCDE
1Date of HireCurrent DateYears
201-Jan-0006-Jan-202025
301-Jan-0006-Jan-2025
425
5
6010
75.0115
810.0120
915.0125
1e
Cell Formulas
RangeFormula
D2D2=DATEDIF(B2,C2,"y")
E2E2=(D2>0)*10+(D2>5)*5+(D2>10)*5+(D2>15)*5
E3E3=LOOKUP(YEARFRAC(B3,C3),C6:D9)
E4E4=LOOKUP(YEARFRAC(B3,C3),{0,10;5.01,15;10.01,20;15.01,25})




A few alternatives that you can try.
Please check the formula with your actual data to ensure that it yields what you require.
E4 is the same formula as E3 but the lookup information is built in.
 
Upvote 0
Try the alternative that you prefer.

Book1
BCDEFG
1Date of HireCurrent Date
201-Jan-0006-Jan-2020.03252525
301-Jan-1606-Jan-201010
1e
Cell Formulas
RangeFormula
D2D2=(C2-B2)/365
E2E2=(D2>0)*10+(D2>5)*5+(D2>10)*5+(D2>15)*5
F2F2=LOOKUP(D2,$C$7:$D$10)
G2G2=MIN(CEILING(YEARFRAC(B2,C2),5)+5,25)
F3F3=LOOKUP((C3-B3)/365,{0,10;5.01,15;10.01,20;15.01,25})
G3G3=MIN(CEILING((C3-B3)/365,5)+5,25)
 
Upvote 0
IF A1 has years of service =MIN(25, 10+FLOOR(A1,5)) will give you the number of vacation days accrued for that year.
 
Upvote 0

Forum statistics

Threads
1,215,040
Messages
6,122,806
Members
449,095
Latest member
m_smith_solihull

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