Calculate total hours in a work week using workdays and punch in and out times

Safety_3rd

New Member
Joined
Sep 17, 2014
Messages
6
I have a list days and clock in and out times. I would like to calculate the total number of hours worked in a work week. The work week begins midnight Sunday and ends at 11:59:59 Saturday. The punch in and out times are in military format. Employees don't work every day of the week. My problems are that if an employee clocks in Saturday at 22:00 and out at 04:15 on Sunday morning 2 hours will go on the previous week and 4:15 hours in the start of the next week. The total hours need to be in decimal form not hh:mm:ss, and I cant just auto sum every 7 lines because an employee might only work 4 days in one week but all 7 in the next week. Any help would be great! Thank you.
Day of week
Punch in
Punch out
Hours
Saturday
22:00
4:15
6:15
Sunday
04:15
05:30
1:15
Monday
21:00
05:30
8:30
Tuesday
etc...
etc...
etc...
Wednesday
Thursday
Friday
Saturday
Monday
Tuesday
Wed
Thur
Fir
Mon
Tue
Wed
Thur
Fri
Sat

<tbody>
</tbody>
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
This should produce number of hours:

=IF(C2>B2,(C2-B2)*24,(C2-B2)*24+24)
 
Upvote 0
Steve, that gives me the total hours worked in the day in decimal form. I then need to determine how to sort that data into the work week and sum based on work day. I also need to figure out how to address the days when an employee clocks in on Saturday and works till Sunday morning. The time Saturday goes on one week and the Sunday goes on the next week. Thank you
 
Upvote 0
Not sure its possible with the data you have there. At least I cant think of a way. How do we decide where one week ends and the next starts? What if an employee has a week off for instance? Can you bring dates in rather than day names?
 
Upvote 0
Punch Date Day of Week Punch In 1 Punch Out 1 Hours 1
03/01/2014 Saturday 21:00 02:14 5:14
03/02/2014 Sunday 02:55 07:40 4:45
03/03/2014 Monday 02:20 07:36 5:16
03/04/2014 Tuesday 02:35 04:05 1:30
03/05/2014 Wednesday 21:37 00:50 3:13
03/06/2014 Thursday 01:31 06:26 4:55
03/07/2014 Friday 01:34 06:26 4:52
03/08/2014 Saturday 02:08 06:39 4:31
03/09/2014 Sunday 01:48 07:35 5:47
03/10/2014 Monday 01:53 06:46 4:53
03/11/2014 Tuesday 02:30 06:34 4:04
03/12/2014 Wednesday 02:38 06:44 4:06
03/13/2014 Thursday 01:36 06:21 4:45
03/14/2014 Friday 01:26 01:46 0:20
03/15/2014 Saturday 21:00 00:54 3:54
03/16/2014 Sunday 01:21 06:02 4:41
03/17/2014 Monday 01:45 07:04 5:19
03/18/2014 Tuesday 02:20 07:03 4:43
03/19/2014 Wednesday 02:32 06:00 3:28
03/20/2014 Thursday 01:48 06:34 4:46
03/21/2014 Friday 01:48 07:19 5:31
03/22/2014 Saturday 01:06 04:05 2:59
03/23/2014 Sunday 21:00 01:14 4:14
03/24/2014 Monday 02:10 05:30 3:20
03/25/2014 Tuesday 21:00 01:38 4:38
03/26/2014 Wednesday 02:31 07:11 4:40
03/27/2014 Thursday 01:30 07:18 5:48
03/28/2014 Friday 02:11 07:23 5:12
 
Upvote 0
Sorry for the horrible table. I guess if there was a way to sum any hours that fell within a 7 day date range? Is that possible?
 
Upvote 0
Good. Could you now post that in columns so i can paste into excel?
 
Upvote 0
Punch DateDay of WeekPunch In 1Punch Out 1Hours 1
03/01/2014Saturday21:0001:004:00
03/02/2014Sunday01:3007:195:49
03/03/2014Monday01:1407:306:16
03/04/2014Tuesday02:3003:301:00
03/05/2014Wednesday01:3605:143:38
03/06/2014Thursday20:5601:004:04
03/07/2014Friday01:2106:144:53
03/08/2014Saturday04:1506:192:04
03/09/2014Sunday01:3007:205:50
03/10/2014Monday01:3306:124:39
03/11/2014Tuesday01:4606:014:15
03/12/2014Wednesday21:1701:053:48
03/13/2014Thursday01:3606:164:40
03/14/2014Friday01:0004:463:46

<colgroup><col width="118" style="width: 89pt; mso-width-source: userset; mso-width-alt: 4315;"> <col width="146" style="width: 110pt; mso-width-source: userset; mso-width-alt: 5339;"> <col width="104" style="width: 78pt; mso-width-source: userset; mso-width-alt: 3803;" span="2"> <col width="132" style="width: 99pt; mso-width-source: userset; mso-width-alt: 4827;"> <tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,734
Members
449,094
Latest member
dsharae57

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