Calculating time of shifts including past midnight shifts.

Diesel9a1

New Member
Joined
Feb 12, 2015
Messages
37
Not quite as simple as the title says. I'm trying to get the timesheet to add up the hours worked. There are several on off's throughout the day / night shifts, each time entry comprises of an hours cell and a minutes cell.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Hrs[/TD]
[TD]Min[/TD]
[TD]Hrs[/TD]
[TD]Min[/TD]
[TD]Hrs[/TD]
[TD]Min[/TD]
[TD]Hrs[/TD]
[TD]Min[/TD]
[TD]Hrs[/TD]
[TD]Min[/TD]
[TD]Hrs[/TD]
[TD]Min[/TD]
[TD]Hrs[/TD]
[TD]Min[/TD]
[TD]Hrs[/TD]
[TD]Min[/TD]
[/TR]
[TR]
[TD]Saturday[/TD]
[TD]11[/TD]
[TD]30[/TD]
[TD]06[/TD]
[TD]00[/TD]
[TD]07[/TD]
[TD]00[/TD]
[TD]12[/TD]
[TD]00[/TD]
[TD]12[/TD]
[TD]30[/TD]
[TD]17[/TD]
[TD]00[/TD]
[TD]18[/TD]
[TD]00[/TD]
[TD]11[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]Sunday[/TD]
[TD]09[/TD]
[TD]30[/TD]
[TD]20[/TD]
[TD]00[/TD]
[TD]21[/TD]
[TD]00[/TD]
[TD]02[/TD]
[TD]00[/TD]
[TD]02[/TD]
[TD]30[/TD]
[TD]05[/TD]
[TD]00[/TD]
[TD]06[/TD]
[TD]00[/TD]
[TD]09[/TD]
[TD]30[/TD]
[/TR]
</tbody>[/TABLE]

I'm unable to merge cells in this post so please bear with me.
The first Hrs/Min are the rostered hours.
Second Hrs/ Min are Depart Depot
Third Hrs / Min are Arrive on site
Fourth Hrs / Min are Stop for dinner
Fifth Hrs / Min are Start work after dinner
Sixth Hrs / Min are Depart Site for depot
Seventh Hrs / Min are Arrive at depot
Eighth and final Hrs / Min are Hours worked.

First and final Hrs / Mins should equal each other.

I'm trying to get the final Hrs / Mins to add up all the hours actually worked (including the travel to and from site).

The Hrs / Mins columns need to be separate to help the non computer literate from not putting in the : etc.

Thanks in advance

Pete
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Hi, here is one possible option you could try:


Excel 2013
ABCDEFGHIJKLMNOPQ
2RosteredDepartArriveDinnerStartDepartArriveFinal
3HrsMinHrsMinHrsMinHrsMinHrsMinHrsMinHrsMinHrsMin
4Saturday1130607012012301701801130
5Sunday930200210202305060930
Sheet1
Cell Formulas
RangeFormula
P4=INT((MOD(TIME(N4,O4,0)-TIME(D4,E4,0),1)-MOD(TIME(J4,K4,0)-TIME(H4,I4,0),1))*24)
Q4=MINUTE(MOD(TIME(N4,O4,0)-TIME(D4,E4,0),1)-MOD(TIME(J4,K4,0)-TIME(H4,I4,0),1))
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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