Annual Leave Entitlement forumla

Brose8

New Member
Joined
Oct 9, 2023
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hello!
I am trying to automate entitlement every year based on my employer.

Starting leave is 20 days.
Following 2 yrs of employment - increase from 20 to 22 days
Following 3 yrs of employment - increase from 22 to 24 days.
Each year following - increase by 1 day up to a max of 30 total annual leave days.

Entitlement runs Jan- Dec.
Based on when contract started- if start date was Jan 1- June 30 you receive full allocation.
If start date was July 1-Dec 31, you receive 50% of the increase.

Many thanks for your help!
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Welcome to the forum, was you after something like the below:
Book1
ABC
1NameStart DateEntitlement
2Person 102/08/198730
3Person 203/05/199930
4Person 301/01/200130
5Person 401/01/201727
6Person 501/01/202024
7Person 601/11/202022
8Person 701/01/202320
Sheet1
Cell Formulas
RangeFormula
C2:C8C2=BYROW(B2:B8,LAMBDA(x,LET( dd,DATEDIF(x,TODAY(),"y"), IFS(dd<2,20,dd=2,22,dd=3,24,dd>3,MIN(24+dd-3,30)))))
Dynamic array formulas.
 
Upvote 0
Welcome to the forum, was you after something like the below:
Book1
ABC
1NameStart DateEntitlement
2Person 102/08/198730
3Person 203/05/199930
4Person 301/01/200130
5Person 401/01/201727
6Person 501/01/202024
7Person 601/11/202022
8Person 701/01/202320
Sheet1
Cell Formulas
RangeFormula
C2:C8C2=BYROW(B2:B8,LAMBDA(x,LET( dd,DATEDIF(x,TODAY(),"y"), IFS(dd<2,20,dd=2,22,dd=3,24,dd>3,MIN(24+dd-3,30)))))
Dynamic array formulas.

Hi! For some reason, that formula is not working for me. It says it is missing an opening or closing parenthesis. I did change the cell #s to match mine, but I am new to these larger formulas, so maybe I need to fill out something else within it differently?
 
Upvote 0
You should be able to just change the B2:B8 part.

Are your dates arranged virtically?

It could also be that your excel needs to have all of the , to be replaced with ; (If your usual seperator in formula is ;)
 
Upvote 0
You should be able to just change the B2:B8 part.

Are your dates arranged virtically?

It could also be that your excel needs to have all of the , to be replaced with ; (If your usual seperator in formula is ;)
Hi! Thank you - yes the dates are arranged vertically. I tried again and am now getting a #SPILL error. I also tried replacing all , with ; and get the formula error pop up.
 
Upvote 0
With the #SPILL error it means that you have data under the formula where the formula is trying to spill into. Try clearing the cells under the formula you put in place that produced the #SPILL error.
 
Upvote 0
You should be able to just change the B2:B8 part.

Are your dates arranged virtically?

It could also be that your excel needs to have all of the , to be replaced with ; (If your usual seperator in formula is ;)
I deleted everything out of the cells to be sure and this now works :) Further question - will the current entitlement automatically change dependent on the current date when you pull up the spreadsheet? Not sure how that piece works. I am trying to do this for a 2024 future spreadsheet, so obviously the entitlement goes up for next year.
 
Upvote 0
Excellent, yes this part of the formula: TODAY() means it is always working with today as the date, it will calculate the difference in years between their start date and today and then calculate from that result.
 
Upvote 0
Excellent, yes this part of the formula: TODAY() means it is always working with today as the date, it will calculate the difference in years between their start date and today and then calculate from that result.
Wonderful! Thank you so much for clarification on the original post :)
 
Upvote 0

Forum statistics

Threads
1,223,162
Messages
6,170,431
Members
452,326
Latest member
johnshaji

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