Leave Entitlement to count pro-rated leave based on joined date.

Status
Not open for further replies.

ambz123

Board Regular
Joined
Aug 27, 2020
Messages
53
Office Version
  1. 2019
Platform
  1. Windows
Hi All, would like to ask how do i change the current formula to achieved the pro-rated calculation based on the following condition:

1. Job Code : M
Less than 2 year = 16 AL
2 years but less than 5 years = 18 AL
More than 5 years = 20 AL

2. Job Code: ESO

Less than 2 year = 14 AL
2 years but less than 5 years = 16 AL
More than 5 years = 18 AL

3. Job Code: TFO

Less than 2 year = 10 AL
2 years but less than 5 years = 12 AL
More than 5 years = 16 AL

However, it has to be pro-rated accordingly to joined date till end of year 31/12/2021 calculation.

If less than 3 months is 0 AL

The table below is the formula im using but i cannot achieved the correct figures.

The formula i used is No. of Leave entitlement+ (No. of months joined till end of year-12)/12 = 17

But the formula gives me 17.5 instead. Need some help with that.


MY - Leave Management.xlsm
ABCDEFGHJKLMN
1ENTER EMPLOYEE DATA
21/28/202112/31/2021
3As ofAs ofAs of
4RequiredRequired1/28/202131/12/211/28/2021
5EMP IDEMPLOYEE NAMECITIZEN CODEJOIN DATEPOSITIONJOB CodeActual months joinedNo. of months joinedHL EntitlementMC EntitlementYE AL EntitlementCurrent AL Entitlement Current Accrued AL
6EPSB 001Gan An HeanMAL12-Jul-2019General ManagerM18296014181617.5
7EPSB 002Nislani Bin NaslinMAL01-Sep-2019Mould FabricatorTFO16276014121011.5
8EPSB 003Mohammad Zamir Bin Abdul JalalMAL02-Sep-2019TechnicianTFO16276014121011.5
9EPSB 004Muhammad Syafiq Ezzuddin Bin ZulkefeliMAL26-Sep-2019TechnicianTFO16276014121011.5
10EPSB 005Muhamad Hafis Bin JumhatMAL10-Sep-2019EngineerESO16276014161415.5
11EPSB 006Mohd Fazwan Bin ShahadMAL18-Sep-2019SupervisorESO16276014161415.5
12EPSB 007Mohd Azizi Bin Awang SuMAL26-Sep-2019BatcherTFO16276014121011.5
13EPSB 008Muhammad Azeem Bin NordinMAL07-Oct-2019TechnicianTFO15266014121011.0
14EPSB 009Muhammad Azrie Bin SarifMAL07-Oct-2019TechnicianTFO15266014121011.0
15EPSB 010Koh Wei MuiMAL01-Nov-2019Office ExecutiveESO14256014161415.0
16EPSB 011Kong Wei ShengMAL01-Nov-2019QS cum DraftsmanESO14256014161415.0
EMPLOYEES
Cell Formulas
RangeFormula
D2D2=TODAY()
E2E2=DATE(YEAR(D2),12,31)
G4,N4G4= TODAY()
G6:G16G6=DATEDIF([@[JOIN DATE]],TODAY(),"m")
H6:H16H6=DATEDIF(D6,DATE(2021,12,31),"m")
K6:K16K6=IF(I6<2,"14",IF(I6<5,"18",IF(I6<6,"22",IF(I6>6,"22","22"))))
L6:L16L6=IF(H6<3,0,IF(F6="M",IF(H6<24,16,IF(H6<=60,18,20)),IF(F6="ESO",IF(H6<24,14,IF(H6<=60,16,18)),IF(F6="TFO",IF(H6<24,10,IF(H6<=60,12,16)),IF(H6<24,8,IF(H6<=60,10,12))))))
M6:M16M6=IF(G6<3,0,IF(F6="M",IF(G6<24,16,IF(G6<=60,18,20)),IF(F6="ESO",IF(G6<24,14,IF(G6<=60,16,18)),IF(F6="TFO",IF(G6<24,10,IF(G6<=60,12,16)),IF(G6<24,8,IF(I6<=60,10,12))))))
N6N6=ROUND(IF(DATEDIF([@[JOIN DATE]],$E$2,"M")<3,0,IF(DATEDIF([@[JOIN DATE]],$E$2,"Y")<1,([@[Current AL Entitlement ]]*(DATEDIF([@[JOIN DATE]],$E$2,"M"))/12),MIN(20,[@[Current AL Entitlement ]]+((DATEDIF([@[JOIN DATE]],$E$2,"M")-12)/12))))/0.5,0)*0.5
N12:N14,N7:N9N7=ROUND(IF(DATEDIF([@[JOIN DATE]],$E$2,"M")<3,0,IF(DATEDIF([@[JOIN DATE]],$E$2,"Y")<1,([@[Current AL Entitlement ]]*(DATEDIF([@[JOIN DATE]],$E$2,"M"))/12),MIN(16,[@[Current AL Entitlement ]]+((DATEDIF([@[JOIN DATE]],$E$2,"M")-12)/12))))/0.5,0)*0.5
N15:N16,N10:N11N10=ROUND(IF(DATEDIF([@[JOIN DATE]],$E$2,"M")<3,0,IF(DATEDIF([@[JOIN DATE]],$E$2,"Y")<1,([@[Current AL Entitlement ]]*(DATEDIF([@[JOIN DATE]],$E$2,"M"))/12),MIN(18,[@[Current AL Entitlement ]]+((DATEDIF([@[JOIN DATE]],$E$2,"M")-12)/12))))/0.5,0)*0.5
Named Ranges
NameRefers ToCells
'LEAVE (2020)'!L_EMPSTDT=T_EMP[JOIN DATE]N6, G6:H6
L_EMPSTDT=T_EMP[JOIN DATE]N6, G6:H6
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Duplicate to: Leave entitlement pro rated

In future, please do not post the same question multiple times. Per Forum Rules (#12), posts of a duplicate nature will be locked or deleted.

In relation to your question here, I have closed this thread so please continue in the linked thread. If you do not receive a response, you can "bump" it by replying to it yourself, though we advise you to wait 24 hours before doing so, and not to bump a thread more than once a day.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,642
Messages
6,120,698
Members
448,979
Latest member
DET4492

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