formula to calculate a 5 year long service award pro-rata

Hello

Please could you help me write a formula to calculate a 5 year long service award on an annual leave sheet.

Here is what I have at the moment

At the moment its not doing exactly what I want.

The formula working out 60 months is in F5 and is =DATEDIF(E5,A9,"m") - E5 is the start date A9 is todays date.

the formula working out 37:00 hours is =IF(F5>59,"37:00","") - it should say 15:25 - here's why.

If this staff member reaches 5 years service part way through the period, they are not entitled to five full days, they are only entitled to 5 months of that long service award which is 15 hours and 25 minutes.  (They accrue 3 hours and 05 minutes per month)

The way I Imagine its done is if we have a formula working out how many months it is from their 5 year anniversary, until the following 31/03/####, and then alter =IF(F5>59,"37:00","") to display the correct number of hours and minutes dependent on that figure? Or is there a better way of doing it?

(Of course the next 31/03/#### would need to be variable as staff join at different years)

Once they reach the next 1st April, they are then entitled to the 5 full days so the formula would need to stop counting at that point leaving them with 37:00

Hope this makes sense?

Here is the monthly accruement chart

Many thanks

Luke

Answer
Answer

Hi Luke

1- Period End Date formula

cell A20=DATE(YEAR(A22)+1*(MONTH(A22)>3),3,31)

2-Long service award formula

cell A18 =IF(F5<60,37*TIME(1,0,0),A17*TIME(3,5,0))


Notes:

You missed to include in the dummy file the data in column P (range P6:P17) so I'm not 100% sure the formula above will give you the expected results.

Check the cases in the pictures below and clarify the results in cell A18

Case 1    More than 60 months from Starting Date

               Period End Date 31/03/2020

Case 2     More than 60 months from Starting Date

               Period End Date 31/03/2021

Case 3     Less than 60 months Starting Date

               Period End Date 31/03/2022

Other Formulas

a) You could use the formula in cell F5  for Total Worked Month =DATEDIF(E5,TODAY(),"m")

b) I hope with the changes implemented above, the formula in cell L5 as it is, give you the expected results. Come back to us and clarify if it not.

Regards

Jeovany

Please,
Consider marking this reply as the answer to your question if it does so.
It will help others in the community with similar problems or questions.
Thank you in advance


Regards
Jeovany CV

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 5, 2021 Views 1,089 Applies to: