Date Calculation

mtagliaferri

Board Regular
Joined
Oct 27, 2004
Messages
156
I am trying to calculate leave entitlement based on the date of joining and current date, at antry date the person has 20 days of leave if the person has completed their 2nd year anniversary by 01 April then they would get 4 extra days.
E.G.
  • if joining date is 15/03/18 annual leave = 24 (completed 2 years by 01 April of current year 2020)
  • if joining date is 15/06/18 annual leave = 20 (has not completed 2 full yeas by 01 April of current year 2020)
Any suggestions?
Thanks
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
How about
+Fluff v2.xlsm
AB
1
215/03/201824
315/06/201820
401/04/201820
Main
Cell Formulas
RangeFormula
B2:B4B2=20+(EDATE(A2,24)<DATE(YEAR(TODAY()),4,1))*4


You may need to change the < to <= depending what should happen if they start on the 1st of April
 
Upvote 0
Solution
How about
+Fluff v2.xlsm
AB
1
215/03/201824
315/06/201820
401/04/201820
Main
Cell Formulas
RangeFormula
B2:B4B2=20+(EDATE(A2,24)<DATE(YEAR(TODAY()),4,1))*4


You may need to change the < to <= depending what should happen if they start on the 1st of April
Thanks that is spot on!!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,821
Messages
6,121,762
Members
449,048
Latest member
excelknuckles

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