Problem calculating extra hours (Work Shift)

Googles

New Member
Joined
Dec 15, 2017
Messages
32
Hello,
I am trying to count the number of the additional hours for my Employee in my Shift calendar:
For example in February: an Employee has 5 additional hours in the month. But he has minus hours in January
Note: that the calculation method is the day, and 1 day = 8 hours
I have used the Mod() and the INT() function in the example shown below, is this true or wrong?

ABCDEFGHIJKLM
112/2019123456789101112
2 202119201219212120181710Work days per Month
3 192119201221212119181710Empleey day Worked
4 -10000200-1000Days Minus plus
5 -800001600-8000Hours Minus plus
6 000000000000
7 -8-800016160-8-800Hours Minus plus

<colgroup><col><col><col span="11"><col><col></colgroup><tbody>
</tbody>


















B4: =B3-B2
B5: =INT(B4*8)+A6
B6: =IF((A5+B5)<0,MOD((A5+B5)/8,-1)*8,MOD((A5+B5)/8,1)*8)
B7: =INT(B4*8)+A5

- In the event that the employee has incomplete working hours, you must move to the next month.
- In the event that the employee has additional hours, the missing hours shall be completed first and the remainder shall be counted as an additional.

Sorry about my English
I hope the you understand me !

thanks
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,215,497
Messages
6,125,160
Members
449,209
Latest member
BakerSteve

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