Excel Formula for Looking up Time In and Out

reighzaigne

New Member
Joined
Oct 19, 2015
Messages
28
Hi!

Our biometrics had a glitch and I have to manually check the data extracted from the machine. There are multiple logs in a day from different people. I would like to know the formula to get the First In and Last Out per person per day. I initially concatenated the employee number and dates to somewhat create a code. So now I just need to get the first and last logs.

Of if you have other ideas on how to solve it, please let me know. :)

Here's an example:
Concatenate EnNoDateTimeDateTime
643467602/01/19 8:4702/01/198:47:07 AM
643467602/01/19 15:4202/01/193:42:31 PM
843468803/01/19 4:4403/01/194:44:47 AM
843468803/01/19 4:4403/01/194:44:47 AM
643468603/01/19 8:5903/01/198:59:15 AM
343468303/01/19 9:2903/01/199:29:31 AM
243468203/01/19 10:4203/01/1910:42:05 AM
243468203/01/19 10:4203/01/1910:42:05 AM
843468803/01/19 13:4503/01/191:45:11 PM
643468603/01/19 17:0003/01/195:00:30 PM
343468303/01/19 17:0903/01/195:09:43 PM
343468303/01/19 17:0903/01/195:09:43 PM
243468203/01/19 19:5303/01/197:53:31 PM
243468203/01/19 19:5303/01/197:53:31 PM
243468203/01/19 21:0803/01/199:08:53 PM

<colgroup><col span="2"><col><col><col></colgroup><tbody>
</tbody>


And then I would like to make it into something like this:
DATEInOutDuration
24348621/01/1902:10:59 AM
24348722/01/19
24348823/01/19
24348924/01/19
24349025/01/19

<colgroup><col span="2"><col><col span="2"></colgroup><tbody>
</tbody>



You can check the file here:
https://drive.google.com/open?id=1H2R5QWzsJRNop3RzsulFIajK9bqwXKDq


Thank you!
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
try


Book1
ABCDE
1Cha12:00:00 AM
2
3DATEInOutDuration
424348621/01/201902:10:59 AM11:43:34 PM21:32:35
524348722/01/201903:31:25 AM07:38:49 PM16:07:24
624348823/01/201912:35:59 PM09:41:47 PM09:05:48
724348924/01/201911:46:49 AM09:04:43 PM09:17:54
824349025/01/201902:52:30 AM08:51:55 PM17:59:25
924349126/01/201904:22:08 AM11:59:45 PM19:37:37
1024349227/01/201904:31:28 PM10:46:00 PM06:14:32
2 - Cha
Cell Formulas
RangeFormula
C4=MINIFS(Sheet1!F:F,Sheet1!B:B,A4,Sheet1!E:E,B4)
D4=MAXIFS(Sheet1!F:F,Sheet1!B:B,A4,Sheet1!E:E,B4)
E4=D4-C4
 
Upvote 0
the minif() & maxif() are not available for the older version of excel, try this


Book1
ABCDE
1Cha12:00:00 AM
2
3DATEInOutDuration
424348621/01/201902:10:59 AM11:43:34 PM21:32:35
524348722/01/201903:31:25 AM07:38:49 PM16:07:24
624348823/01/201912:35:59 PM09:41:47 PM09:05:48
724348924/01/201911:46:49 AM09:04:43 PM09:17:54
824349025/01/201902:52:30 AM08:51:55 PM17:59:25
924349126/01/201904:22:08 AM11:59:45 PM19:37:37
1024349227/01/201904:31:28 PM10:46:00 PM06:14:32
1124349328/01/201912:43:45 AM11:37:03 PM22:53:18
2 - Cha
Cell Formulas
RangeFormula
E4=D4-C4
C4{=MIN(IF(Sheet1!$B1:$B10000='2 - Cha'!A4,IF(Sheet1!$E1:$E10000='2 - Cha'!B4,Sheet1!$F1:$F10000)))}
D4{=MAX(IF(Sheet1!$B1:$B10000='2 - Cha'!A4,IF(Sheet1!$E1:$E10000='2 - Cha'!B4,Sheet1!$F1:$F10000)))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,213,532
Messages
6,114,176
Members
448,554
Latest member
Gleisner2

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