Pro Rated Annual leave with different conditions

ambz123

Board Regular
Joined
Aug 27, 2020
Messages
53
Office Version
  1. 2019
Platform
  1. Windows
Hi I am task to create a excel formula with the condition where by if staff A is a manager he is entitled to the following leave and max cap at 22;
GradePosition1st year2nd - 5 year6-9 year10 & above
MManager14182122
Non Junior Managerial they are entitled to the following condition of leave and map cap at 21:
GradePosition1st year2nd - 5 year6 - 9 year10 & abv
JMJunior Manager14161821
Executive are entitled to the following condition of leave max cap at 18:
GradePosition1st year2nd - 5 year6 -9 year10 & abv
E1/E2Executive10141618

Would appreciate some help on this.

1609204043014.png


I used the following formula to get my current accrued leave, however i am facing problem with including the condition based on their job grade.

=ROUND(IF(DATEDIF([@[JOIN DATE]],$D$2,"M")<3,0,IF(DATEDIF([@[JOIN DATE]],$D$2,"Y")<1,([@[Actual Entitlement]]*(DATEDIF([@[JOIN DATE]],$D$2,"M"))/12),MIN(14,[@[Actual Entitlement]]+((DATEDIF([@[JOIN DATE]],$D$2,"M")-12)/12))))/0.5,0)*0.5
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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