Time Sheet?

oogles36

New Member
Joined
Nov 16, 2023
Messages
12
Office Version
  1. 2016
Platform
  1. Windows
I have a list of Clock in and Clock outs. Its formatted like this:

Column A : Employee Name
Column E: Date and time in this format: May 16, 2023 10:21:14 PM
Column F: On (for an on punch or Off for a clock out)

The list I have is about 150k rows....

I'm trying to find a formula or a way to just see employees that clock in with less than 10 hours off.

So if you clocked out May 16, 2023 at 10:21:14 PM and then clock in May 17, 2023 at 01:14:14 AM you would be flagged somehow...
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Perhaps something like this. The FALSE lines indicate a clock on date/time in shorter period than 10 Hrs.

Book1
ABCDEFG
1namedateon/off
2Emp 116-05-23 10:21 PMoff 
3Emp 117-05-23 1:14 AMonFALSE
4Emp 318-11-23 8:00 AMonTRUE
5Emp 418-11-23 8:00 AMonTRUE
6Emp 518-11-23 8:00 AMonTRUE
7Emp 618-11-23 8:00 AMonTRUE
8Emp 718-11-23 8:00 AMonTRUE
9Emp 818-11-23 8:00 AMonTRUE
10Emp 918-11-23 8:00 AMonTRUE
11Emp 118-11-23 5:00 PMoff 
12Emp 218-11-23 5:00 PMoff 
13Emp 318-11-23 5:00 PMoff 
14Emp 418-11-23 11:00 PMoff 
15Emp 518-11-23 5:00 PMoff 
16Emp 618-11-23 5:00 PMoff 
17Emp 718-11-23 5:00 PMoff 
18Emp 119-11-23 8:00 AMonTRUE
19Emp 219-11-23 8:00 AMonTRUE
20Emp 319-11-23 8:00 AMonTRUE
21Emp 419-11-23 8:00 AMonFALSE
22Emp 519-11-23 8:00 AMonTRUE
23Emp 619-11-23 8:00 AMonTRUE
24Emp 719-11-23 8:00 AMonTRUE
Sheet1
Cell Formulas
RangeFormula
G2:G24G2=IF(F2="on",(E2-MAXIFS(E$1:E1,F$1:F1,"off",A$1:A1,A2))>TIME(10,0,0),"")
 
Upvote 0
So far so good, how do you get it to say true or false? mine is coming up #NAME? instead of False
 
Upvote 0
Ah I think its because mine started at E3 lol I updated the formula and its running it now, Maybe I shouldn't have had it do 70k rows at once but we will see how long it takes.
 
Upvote 0
See the O2016 column for an alternative:
Book1
ABCDEFGH
1namedateon/offO365O2016
2Emp 116-05-23 10:21 PMoff  
3Emp 117-05-23 1:14 AMonFALSEFALSE
4Emp 318-11-23 8:00 AMonTRUETRUE
5Emp 418-11-23 8:00 AMonTRUETRUE
6Emp 518-11-23 8:00 AMonTRUETRUE
7Emp 618-11-23 8:00 AMonTRUETRUE
8Emp 718-11-23 8:00 AMonTRUETRUE
9Emp 818-11-23 8:00 AMonTRUETRUE
10Emp 918-11-23 8:00 AMonTRUETRUE
11Emp 118-11-23 5:00 PMoff  
12Emp 218-11-23 5:00 PMoff  
13Emp 318-11-23 5:00 PMoff  
14Emp 418-11-23 11:00 PMoff  
15Emp 518-11-23 5:00 PMoff  
16Emp 618-11-23 5:00 PMoff  
17Emp 718-11-23 5:00 PMoff  
18Emp 119-11-23 8:00 AMonTRUETRUE
19Emp 219-11-23 8:00 AMonTRUETRUE
20Emp 319-11-23 8:00 AMonTRUETRUE
21Emp 419-11-23 8:00 AMonFALSEFALSE
22Emp 519-11-23 8:00 AMonTRUETRUE
23Emp 619-11-23 8:00 AMonTRUETRUE
24Emp 719-11-23 8:00 AMonTRUETRUE
Sheet1
Cell Formulas
RangeFormula
G2:G24G2=IF(F2="on",(E2-MAXIFS(E$1:E1,F$1:F1,"off",A$1:A1,A2))>TIME(10,0,0),"")
H2:H24H2=IF(F2="on",(E2-MAX(IF(F$1:F1="off",IF(A$1:A1=A2,E$1:E1,""),"")))>TIME(10,0,0),"")
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Book1.xlsx
ABCDEFG
1JOHN DOESep 6, 2023 4:47:03 AMon 
2Sep 6, 2023 1:16:51 PMoffTRUE
3Sep 7, 2023 4:49:33 AMon 
4Sep 7, 2023 6:36:54 PMoffTRUE
5Sep 8, 2023 4:48:53 AMon 
6Sep 8, 2023 2:41:28 PMoffTRUE
7Sep 10, 2023 5:13:39 AMon 
8Sep 10, 2023 2:42:03 PMOFFTRUE
9Sep 11, 2023 4:49:56 AMon 
10Sep 11, 2023 2:42:53 PMoffTRUE
11Sep 12, 2023 4:47:21 AMon 
12Sep 12, 2023 2:39:46 PMoffTRUE
13Sep 13, 2023 4:50:34 AMon 
14Sep 13, 2023 2:46:19 PMoffTRUE
15Sep 14, 2023 4:43:23 AMon 
16Sep 14, 2023 1:03:23 PMoffTRUE
17Sep 15, 2023 4:49:58 AMon 
18Sep 15, 2023 2:38:02 PMoffTRUE
19Sep 18, 2023 4:45:32 AMon 
20Sep 18, 2023 2:52:49 PMoffTRUE
21Sep 19, 2023 4:42:18 AMon 
22Sep 19, 2023 3:00:53 PMoffTRUE
23Sep 20, 2023 4:48:59 AMon 
24Sep 20, 2023 2:53:44 PMoffTRUE
25Sep 21, 2023 4:51:14 AMon 
26Sep 21, 2023 2:42:11 PMoffTRUE
27Sep 22, 2023 4:50:25 AMon 
28Sep 22, 2023 2:41:58 PMoffTRUE
29Sep 24, 2023 5:10:11 AMon 
30Sep 24, 2023 7:12:56 PMoffFALSE
31Sep 25, 2023 4:42:09 AMon 
32Sep 25, 2023 2:37:39 PMoffTRUE
33Sep 26, 2023 4:47:01 AMon 
34Sep 26, 2023 1:01:51 PMoffTRUE
35Sep 27, 2023 4:48:31 AMon 
36Sep 27, 2023 2:45:20 PMoffTRUE
37Sep 28, 2023 4:26:50 AMon 
38Sep 28, 2023 8:07:07 PMoffFALSE
39Sep 29, 2023 4:38:11 AMon 
40Sep 29, 2023 12:29:17 PMoff 
Sheet1
Cell Formulas
RangeFormula
G1:G40G1=IF(F2="on",(E2-MAX(IF(F$1:F1="off",IF(A$1:A1=A2,E$1:E1,""),"")))>TIME(10,0,0),"")
 
Upvote 0
Report September 2023.xlsx
AEFG
1NAME 1Sep 6, 2023 4:47:03 AMon 
2Sep 6, 2023 11:16:51 PMoffFALSE
3Sep 7, 2023 4:49:33 AMon 
4Sep 7, 2023 6:36:54 PMoffTRUE
5Sep 8, 2023 4:48:53 AMon 
6Sep 8, 2023 2:41:28 PMoffTRUE
7Sep 10, 2023 5:13:39 AMon 
8Sep 10, 2023 2:42:03 PMoffTRUE
9Sep 11, 2023 4:49:56 AMon 
10Sep 11, 2023 2:42:53 PMoffTRUE
11Sep 12, 2023 4:47:21 AMon 
12Sep 12, 2023 2:39:46 PMoffTRUE
13Sep 13, 2023 4:50:34 AMon 
14Sep 13, 2023 2:46:19 PMoffTRUE
15Sep 14, 2023 4:43:23 AMon 
16Sep 14, 2023 1:03:23 PMoffTRUE
17Sep 15, 2023 4:49:58 AMon 
18Sep 15, 2023 2:38:02 PMoffTRUE
19Sep 18, 2023 4:45:32 AMon 
20Sep 18, 2023 2:52:49 PMoffTRUE
21Sep 19, 2023 4:42:18 AMon 
22Sep 19, 2023 3:00:53 PMoffTRUE
23Sep 20, 2023 4:48:59 AMon 
24Sep 20, 2023 2:53:44 PMoffTRUE
25Sep 21, 2023 4:51:14 AMon 
26Sep 21, 2023 2:42:11 PMoffTRUE
27Sep 22, 2023 4:50:25 AMon 
28Sep 22, 2023 2:41:58 PMoffTRUE
29Sep 24, 2023 5:10:11 AMon 
30Sep 24, 2023 7:12:56 PMoffTRUE
31Sep 25, 2023 4:42:09 AMon 
32Sep 25, 2023 2:37:39 PMoffTRUE
33Sep 26, 2023 4:47:01 AMon 
34Sep 26, 2023 1:01:51 PMoffTRUE
35Sep 27, 2023 4:48:31 AMon 
36Sep 27, 2023 2:45:20 PMoffTRUE
37Sep 28, 2023 4:26:50 AMon 
38Sep 28, 2023 8:07:07 PMoffTRUE
39Sep 29, 2023 4:38:11 AMon 
40Sep 29, 2023 12:29:17 PMoff#VALUE!
41NAME 2Sep 5, 2023 8:59:40 AMon 
42Sep 5, 2023 5:00:05 PMoffFALSE
43Sep 6, 2023 9:00:43 AMON 
44Sep 6, 2023 5:00:55 PMoffFALSE
45Sep 7, 2023 8:58:55 AMon 
46Sep 7, 2023 5:00:13 PMoffFALSE
47Sep 8, 2023 8:53:16 AMon 
48Sep 8, 2023 5:00:20 PMoffFALSE
49Sep 11, 2023 6:39:59 AMon#VALUE!
Page1_1
Cell Formulas
RangeFormula
G1:G49G1=IF(F2="on",(E2-MAX(IF(F$1:F1="off",IF(A$1:A1=A2,E$1:E1,""),"")))>TIME(8,0,0),"")
 
Upvote 0
Not too sure why it does the Value after the employee name changes? Or why it switches from true/false?

Sorry lol
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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