Calculating overtime for workers

smscheung

New Member
Joined
Mar 14, 2019
Messages
26
I would like to make a formula stating below:
worker finishes work at 18:00,
after 18:25, we give half an hour OT
after 18:45, we give 1 hour OT
I also need to take into account some workers might work a few hours OT, therefore if he finishes work 19:25, I need excel to show 1hr30minutes OT
20:45 will be 2 hours and so on.
Is this possible?
Thanks a lot.
 
With the start-of-work time in cell A1, the following formulas will give you:

decimal OT hours (formatted as General) =SIGN(A1)*(HOUR("8:00"-A1)+LOOKUP(MINUTE("8:00"-A1),{0,25,51},{0,0.5,1}))

OT in hours:minutes (formatted as h:mm) =SIGN(A1)*(HOUR("8:00"-A1)+LOOKUP(MINUTE("8:00"-A1),{0,25,51},{0,0.5,1}))/24

Thanks a lot for your help, now all my problems are solved! Also learned this new formula
 
Upvote 0

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,215,517
Messages
6,125,288
Members
449,218
Latest member
Excel Master

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