Pro-rated leave for range

ambz123

Board Regular
Joined
Aug 27, 2020
Messages
53
Office Version
  1. 2019
Platform
  1. Windows
Hi,

I am task to create a leave management that auto calculates the pro-rated leave entitlement based on the following condition.

If the employee is Manager he will be entitled to 16 days of annual leave but it has to be pro-rated in accordance to his join date and less than 2 years is 16 days, 2 years but less than 5years of service is 18 days, 5 years and above is 20 days.

While if the employee is Executive he will be entitled to 14 days of annual leave but same thing, the 14 days will be pro-rated in accordance to his join date when he first join the company. Less than 2 years is 14 days, 2 years but less than 5years of service is 16 days, 5 years and above is 18 days.

Need some help in this.
1609399806829.png

Thank you.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
1,839
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Please upload your Example file with minimum 10 rows with XL2BB ADDIN (Preferable) or upload it to free hosting site e.g. www.dropbox.com and input link here.
 

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
1,839
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
If your Job code (Type) is in F column (first F2) & Month Joined is in Clumn G (first G2) write this and drag it down:
Excel Formula:
=IF(F2="M",IF(G2<=24,16,IF(G2<=60,18,20)),IF(G2<=24,14,IF(G2<=60,16,18)))
 

ambz123

Board Regular
Joined
Aug 27, 2020
Messages
53
Office Version
  1. 2019
Platform
  1. Windows
Hi if i have more than 1 job code that formula wont work correctly
1609721408930.png
 

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
1,839
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows

ADVERTISEMENT

Then what is your manager Job Grades?

If you have Word "Manager" in all of your job code for Managers, Use This:
Excel Formula:
=IF(RIGHT(E2,LEN(E2)-FIND(" ",E2,1))="Manager",IF(G2<=24,16,IF(G2<=60,18,20)),IF(G2<=24,14,IF(G2<=60,16,18)))
 
Last edited:

ambz123

Board Regular
Joined
Aug 27, 2020
Messages
53
Office Version
  1. 2019
Platform
  1. Windows
my Job Grades consist of the word "Manager" , "Executive", "Technician", "Foreign Worker"
Each of them have different leave entitlement based on their Job grade and length of services as follow:

Manager : <2 = 16, 2≤5 = 18, >5 = 20
Executive: <2 = 14, 2≤5 = 16, >5 = 18
Technician: <2 = 10, 2≤5 = 12, >5 = 16
Foreign Worker: <2 = 8, 2≤5 = 10, >5 = 12
 

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
1,839
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows

ADVERTISEMENT

Then what is Abbreviation at Job Grades and what they Means? How I can Use them.
I don't see exact of this word at Job Code OR Job Grade Columns.
 

ambz123

Board Regular
Joined
Aug 27, 2020
Messages
53
Office Version
  1. 2019
Platform
  1. Windows
Hi for the Job Code i have assign codes for each position as follow:

For Manager = M
For Executive = ESO
For Technician = TFO
For Foreign Worker = FW

1609739549253.png
 

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
1,839
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Technician: <2 = 10, 2≤5 = 12, >5 = 16
I think Last one should be 14 at this part then Use this code:
Excel Formula:
=IF(F2="M",IF(G2<=24,16,IF(G2<=60,18,20)),IF(F2="ESO",IF(G2<=24,14,IF(G2<=60,16,18)),IF(F2="TFO",IF(G2<=24,10,IF(G2<=60,12,14)),IF(G2<=24,8,IF(G2<=60,10,12)))))
If Not Use this:
Excel Formula:
=IF(F2="M",IF(G2<=24,16,IF(G2<=60,18,20)),IF(F2="ESO",IF(G2<=24,14,IF(G2<=60,16,18)),IF(F2="TFO",IF(G2<=24,10,IF(G2<=60,12,16)),IF(G2<=24,8,IF(G2<=60,10,12)))))
 

ambz123

Board Regular
Joined
Aug 27, 2020
Messages
53
Office Version
  1. 2019
Platform
  1. Windows
Another condition is if employee who works less than 3 months their leave entitled 0 after 3 months will be pro-rated accordingly to their join date.
 

Watch MrExcel Video

Forum statistics

Threads
1,130,211
Messages
5,640,887
Members
417,177
Latest member
njosh

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
Top