Excel Formula - Work Hours Computation

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>[TABLE="width: 0"]
<colgroup><col style="width: 61px"><col width="102"><col width="102"><col width="102"><col width="102"><col width="102"><col width="112"><col width="112"></colgroup><tbody>[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=77AD1C]#77AD1C[/URL] , align: center"]Staff No.[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=77AD1C]#77AD1C[/URL] , align: center"]Issued Time[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=77AD1C]#77AD1C[/URL] , align: center"]Issued Date[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=77AD1C]#77AD1C[/URL] , align: center"]issdatetime[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=77AD1C]#77AD1C[/URL] , align: center"]Checkout Time[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=77AD1C]#77AD1C[/URL] , align: center"]Checkout Date[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=77AD1C]#77AD1C[/URL] , align: center"]checkdatetime[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=77AD1C]#77AD1C[/URL] , align: center"]Hours Worked[/TD]
[/TR]
[TR]
[TD="align: center"]56731[/TD]
[TD="align: center"]7:24:11[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:24[/TD]
[TD="align: center"]17:41:46[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 17:41[/TD]
[TD="align: right"]10.29305556[/TD]
[/TR]
[TR]
[TD="align: center"]58640[/TD]
[TD="align: center"]7:12:36[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:12[/TD]
[TD="align: center"]19:30:46[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:30[/TD]
[TD="align: right"]12.30277778[/TD]
[/TR]
[TR]
[TD="align: center"]56756[/TD]
[TD="align: center"]7:12:24[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:12[/TD]
[TD="align: center"]19:47:20[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:47[/TD]
[TD="align: right"]12.58222222[/TD]
[/TR]
[TR]
[TD="align: center"]57541[/TD]
[TD="align: center"]7:11:26[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:11[/TD]
[TD="align: center"]19:31:23[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:31[/TD]
[TD="align: right"]12.3325[/TD]
[/TR]
[TR]
[TD="align: center"]56735[/TD]
[TD="align: center"]7:08:32[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:08[/TD]
[TD="align: center"]19:31:10[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:31[/TD]
[TD="align: right"]12.37722222[/TD]
[/TR]
[TR]
[TD="align: center"]56752[/TD]
[TD="align: center"]7:08:25[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:08[/TD]
[TD="align: center"]19:47:26[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:47[/TD]
[TD="align: right"]12.65027778[/TD]
[/TR]
[TR]
[TD="align: center"]56756[/TD]
[TD="align: center"]7:07:57[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:07[/TD]
[TD="align: center"]19:46:37[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:46[/TD]
[TD="align: right"]12.64444444[/TD]
[/TR]
[TR]
[TD="align: center"]58673[/TD]
[TD="align: center"]7:03:25[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:03[/TD]
[TD="align: center"]19:30:57[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:30[/TD]
[TD="align: right"]12.45888889[/TD]
[/TR]
[TR]
[TD="align: center"]55443[/TD]
[TD="align: center"]7:00:57[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:00[/TD]
[TD="align: center"]19:46:42[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:46[/TD]
[TD="align: right"]12.7625[/TD]
[/TR]
[TR]
[TD="align: center"]58793[/TD]
[TD="align: center"]6:53:37[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 06:53[/TD]
[TD="align: center"]19:30:32[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:30[/TD]
[TD="align: right"]12.61527778[/TD]
[/TR]
[TR]
[TD="align: center"]56626[/TD]
[TD="align: center"]6:46:19[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 06:46[/TD]
[TD="align: center"]19:46:49[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:46[/TD]
[TD="align: right"]13.00833333[/TD]
[/TR]
[TR]
[TD="align: center"]57661[/TD]
[TD="align: center"]19:01:14[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: center"]11 Dec 18 19:01[/TD]
[TD="align: center"]7:51:15[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 07:51[/TD]
[TD="align: right"]12.83361111[/TD]
[/TR]
[TR]
[TD="align: center"]56755[/TD]
[TD="align: center"]18:58:58[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: center"]11 Dec 18 18:58[/TD]
[TD="align: center"]7:31:04[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 07:31[/TD]
[TD="align: right"]12.535[/TD]
[/TR]
[TR]
[TD="align: center"]57178[/TD]
[TD="align: center"]18:48:25[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: center"]11 Dec 18 18:48[/TD]
[TD="align: center"]7:30:39[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 07:30[/TD]
[TD="align: right"]12.70388889[/TD]
[/TR]
[TR]
[TD="align: center"]56760[/TD]
[TD="align: center"]18:46:13[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: center"]11 Dec 18 18:46[/TD]
[TD="align: center"]7:51:14[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 07:51[/TD]
[TD="align: right"]13.08361111[/TD]
[/TR]
[TR]
[TD="align: center"]55728[/TD]
[TD="align: center"]18:33:17[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: center"]11 Dec 18 18:33[/TD]
[TD="align: center"]7:30:55[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 07:30[/TD]
[TD="align: right"]12.96055556[/TD]
[/TR]
[TR]
[TD="align: center"]56735[/TD]
[TD="align: center"]7:17:54[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: center"]11 Dec 18 07:17[/TD]
[TD="align: center"]19:31:22[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: right"]11 Dec 18 19:31[/TD]
[TD="align: right"]12.22444444[/TD]
[/TR]
[TR]
[TD="align: center"]56731[/TD]
[TD="align: center"]7:17:16[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: center"]11 Dec 18 07:17[/TD]
[TD="align: center"]17:44:50[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: right"]11 Dec 18 17:44[/TD]
[TD="align: right"]10.45944444[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Hi oldbrewer,

Thanks for helping me again. I think your computation isn't based on the shift schedule on the second sheet? Ideally, I would only want to count the number of hours within the shift schedule.

<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>[TABLE="width: 0"]
<tbody>[TR]
[TD="align: center"]Staff No.[/TD]
[TD="align: center"]Issued Time[/TD]
[TD="align: center"]Issued Date[/TD]
[TD="align: center"]issdatetime[/TD]
[TD="align: center"]Checkout Time[/TD]
[TD="align: center"]Checkout Date[/TD]
[TD="align: center"]checkdatetime[/TD]
[TD="align: center"]Hours Worked[/TD]
[/TR]
[TR]
[TD="align: center"]56731[/TD]
[TD="align: center"]7:24:11[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:24[/TD]
[TD="align: center"]17:41:46[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 17:41[/TD]
[TD="align: right"]10.29305556[/TD]
[/TR]
[TR]
[TD="align: center"]58640[/TD]
[TD="align: center"]7:12:36[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:12[/TD]
[TD="align: center"]19:30:46[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:30[/TD]
[TD="align: right"]12.30277778[/TD]
[/TR]
[TR]
[TD="align: center"]56756[/TD]
[TD="align: center"]7:12:24[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:12[/TD]
[TD="align: center"]19:47:20[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:47[/TD]
[TD="align: right"]12.58222222[/TD]
[/TR]
[TR]
[TD="align: center"]57541[/TD]
[TD="align: center"]7:11:26[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:11[/TD]
[TD="align: center"]19:31:23[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:31[/TD]
[TD="align: right"]12.3325[/TD]
[/TR]
[TR]
[TD="align: center"]56735[/TD]
[TD="align: center"]7:08:32[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:08[/TD]
[TD="align: center"]19:31:10[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:31[/TD]
[TD="align: right"]12.37722222[/TD]
[/TR]
[TR]
[TD="align: center"]56752[/TD]
[TD="align: center"]7:08:25[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:08[/TD]
[TD="align: center"]19:47:26[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:47[/TD]
[TD="align: right"]12.65027778[/TD]
[/TR]
[TR]
[TD="align: center"]56756[/TD]
[TD="align: center"]7:07:57[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:07[/TD]
[TD="align: center"]19:46:37[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:46[/TD]
[TD="align: right"]12.64444444[/TD]
[/TR]
[TR]
[TD="align: center"]58673[/TD]
[TD="align: center"]7:03:25[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:03[/TD]
[TD="align: center"]19:30:57[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:30[/TD]
[TD="align: right"]12.45888889[/TD]
[/TR]
[TR]
[TD="align: center"]55443[/TD]
[TD="align: center"]7:00:57[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 07:00[/TD]
[TD="align: center"]19:46:42[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:46[/TD]
[TD="align: right"]12.7625[/TD]
[/TR]
[TR]
[TD="align: center"]58793[/TD]
[TD="align: center"]6:53:37[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 06:53[/TD]
[TD="align: center"]19:30:32[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:30[/TD]
[TD="align: right"]12.61527778[/TD]
[/TR]
[TR]
[TD="align: center"]56626[/TD]
[TD="align: center"]6:46:19[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: center"]12 Dec 18 06:46[/TD]
[TD="align: center"]19:46:49[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 19:46[/TD]
[TD="align: right"]13.00833333[/TD]
[/TR]
[TR]
[TD="align: center"]57661[/TD]
[TD="align: center"]19:01:14[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: center"]11 Dec 18 19:01[/TD]
[TD="align: center"]7:51:15[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 07:51[/TD]
[TD="align: right"]12.83361111[/TD]
[/TR]
[TR]
[TD="align: center"]56755[/TD]
[TD="align: center"]18:58:58[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: center"]11 Dec 18 18:58[/TD]
[TD="align: center"]7:31:04[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 07:31[/TD]
[TD="align: right"]12.535[/TD]
[/TR]
[TR]
[TD="align: center"]57178[/TD]
[TD="align: center"]18:48:25[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: center"]11 Dec 18 18:48[/TD]
[TD="align: center"]7:30:39[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 07:30[/TD]
[TD="align: right"]12.70388889[/TD]
[/TR]
[TR]
[TD="align: center"]56760[/TD]
[TD="align: center"]18:46:13[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: center"]11 Dec 18 18:46[/TD]
[TD="align: center"]7:51:14[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 07:51[/TD]
[TD="align: right"]13.08361111[/TD]
[/TR]
[TR]
[TD="align: center"]55728[/TD]
[TD="align: center"]18:33:17[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: center"]11 Dec 18 18:33[/TD]
[TD="align: center"]7:30:55[/TD]
[TD="align: center"]12/12/2018[/TD]
[TD="align: right"]12 Dec 18 07:30[/TD]
[TD="align: right"]12.96055556[/TD]
[/TR]
[TR]
[TD="align: center"]56735[/TD]
[TD="align: center"]7:17:54[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: center"]11 Dec 18 07:17[/TD]
[TD="align: center"]19:31:22[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: right"]11 Dec 18 19:31[/TD]
[TD="align: right"]12.22444444[/TD]
[/TR]
[TR]
[TD="align: center"]56731[/TD]
[TD="align: center"]7:17:16[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: center"]11 Dec 18 07:17[/TD]
[TD="align: center"]17:44:50[/TD]
[TD="align: center"]12/11/2018[/TD]
[TD="align: right"]11 Dec 18 17:44[/TD]
[TD="align: right"]10.45944444[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0
i didn't see it lol but 56731 was booked for 7am to 7pm yet clocked in late and clocked out early - and what if somebody starts 7 pm friday until 7 am saturday - does the sat sun allowance take precedence
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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