Calculating total hours by day with multiple clocks in and out per day.

leapinlabs

New Member
Joined
Aug 4, 2011
Messages
6
Office Version
  1. 365
Platform
  1. Windows
I have a spreadsheet that includes an In Time column and an Out Time column. Each employee has several in punches and several out punches during any given date. I need to calculate the final out punch for the date less the first in punch for the same date. I've searched here an not found anything that works. Currently I am manually changing the Daily Total to
=TEXT(H3-G2,"hh:mm") to get the 7:14 . Is there a way to have excel "see" the change in the date and calculate automatically? This is my first time posting and wasn't sure how to show this...

In time
Out timeHoursDaily Total
3/13/2023 8:17​
3/13/2023 10:54​
2.62​
3/13/2023 11:09​
3/13/2023 15:31​
4.37​
07:14
3/14/2023 5:55​
3/14/2023 9:05​
3.17​
3/14/2023 9:18​
3/14/2023 12:42​
3.4​
3/14/2023 13:15​
3/14/2023 16:03​
2.8​
10:08
3/15/2023 8:11​
3/15/2023 11:22​
3.18​
3/15/2023 11:35​
3/15/2023 12:24​
0.82​
3/15/2023 12:45​
3/15/2023 14:46​
2.02​
3/15/2023 14:58​
3/15/2023 16:30​
1.53​
08:19
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
I have updated it, I am using ms 365
 
Upvote 0
Thanks for that (y)
How about
Fluff.xlsm
ABCD
1In timeOut timeHoursDaily Total
213/03/2023 08:1713/03/2023 10:542.62 
313/03/2023 11:0913/03/2023 15:314.3707:14:00
414/03/2023 05:5514/03/2023 09:053.17 
514/03/2023 09:1814/03/2023 12:423.4 
614/03/2023 13:1514/03/2023 16:032.810:08:00
715/03/2023 08:1115/03/2023 11:223.18 
815/03/2023 11:3515/03/2023 12:240.82 
915/03/2023 12:4515/03/2023 14:462.02 
1015/03/2023 14:5815/03/2023 16:301.5308:19:00
11
12
TravelCosts
Cell Formulas
RangeFormula
D2:D10D2=IF(INT(A2)=INT(B3),"",B2-MIN(FILTER($A$2:$A$100,INT($A$2:$A$100)=INT(B2))))
 
Upvote 1
Solution
Thanks for that (y)
How about
Fluff.xlsm
ABCD
1In timeOut timeHoursDaily Total
213/03/2023 08:1713/03/2023 10:542.62 
313/03/2023 11:0913/03/2023 15:314.3707:14:00
414/03/2023 05:5514/03/2023 09:053.17 
514/03/2023 09:1814/03/2023 12:423.4 
614/03/2023 13:1514/03/2023 16:032.810:08:00
715/03/2023 08:1115/03/2023 11:223.18 
815/03/2023 11:3515/03/2023 12:240.82 
915/03/2023 12:4515/03/2023 14:462.02 
1015/03/2023 14:5815/03/2023 16:301.5308:19:00
11
12
TravelCosts
Cell Formulas
RangeFormula
D2:D10D2=IF(INT(A2)=INT(B3),"",B2-MIN(FILTER($A$2:$A$100,INT($A$2:$A$100)=INT(B2))))
Thank you Fluff! I am not getting the correct values after copying the formula and changing column. I will look a bit deeper at this formula to try to find out why.
 
Upvote 0
Thank you Fluff! I am not getting the correct values after copying the formula and changing column. I will look a bit deeper at this formula to try to find out why.
I'm still struggling with the correct values.
I don't know why it's not calculating incorrectly in my spreadsheet where the formula in e3 is:
=IF(INT(A3)=INT(B4),"",B3-MIN(FILTER($A$2:$A$100,INT($A$2:$A$100)=INT(B3))))
In timeOut timeOut Punch TypeHoursDaily Total
3/13/2023 8:17​
3/13/2023 10:54​
2.62​
3/13/2023 11:09​
3/13/2023 15:31​
4.37​
9:21:00​
3/14/2023 5:55​
3/14/2023 9:05​
3.17​
3/14/2023 9:18​
3/14/2023 12:42​
3.4​
3/14/2023 13:15​
3/14/2023 16:03​
2.8​
10:18:00​
3/15/2023 8:11​
3/15/2023 11:22​
3.18​
3/15/2023 11:35​
3/15/2023 12:24​
0.82​
3/15/2023 12:45​
3/15/2023 14:46​
2.02​
3/15/2023 14:58​
3/15/2023 16:30​
1.53​
11:33:00​
 
Upvote 0
Do you have dates for the 13th further down the data?
 
Upvote 0
Ah, YES! with a different employee! So I will need to do another if to verify employee! Let me try that!
Thank you Fluff!! That was it! A duh moment, I didn't even think of that major/minor detail! I appreciate your help with this! This is going to make life much simpler!
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,640
Messages
6,125,977
Members
449,276
Latest member
surendra75

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