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?

[TABLE="class: grid, width: 751, align: left"]
<colgroup><col><col><col span="11"><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[TD]M[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]12/2019[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]6[/TD]
[TD]7[/TD]
[TD]8[/TD]
[TD]9[/TD]
[TD]10[/TD]
[TD]11[/TD]
[TD]12[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD] [/TD]
[TD]20[/TD]
[TD]21[/TD]
[TD]19[/TD]
[TD]20[/TD]
[TD]12[/TD]
[TD]19[/TD]
[TD]21[/TD]
[TD]21[/TD]
[TD]20[/TD]
[TD]18[/TD]
[TD]17[/TD]
[TD]10[/TD]
[TD]Work days per Month[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD] [/TD]
[TD]19[/TD]
[TD]21[/TD]
[TD]19[/TD]
[TD]20[/TD]
[TD]12[/TD]
[TD]21[/TD]
[TD]21[/TD]
[TD]21[/TD]
[TD]19[/TD]
[TD]18[/TD]
[TD]17[/TD]
[TD]10[/TD]
[TD]Empleey day Worked[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD] [/TD]
[TD]-1[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]-1[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]Days Minus plus[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD] [/TD]
[TD]-8[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]16[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]-8[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]Hours Minus plus[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD] [/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD] [/TD]
[TD]-8[/TD]
[TD]-8[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]16[/TD]
[TD]16[/TD]
[TD]0[/TD]
[TD]-8[/TD]
[TD]-8[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]Hours Minus plus[/TD]
[/TR]
</tbody>[/TABLE]


















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

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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