Multiple conditions to return start/end time

Peter Muller

Board Regular
Joined
Oct 15, 2018
Messages
133
Office Version
  1. 365
Platform
  1. Windows
Good evening,

I have a table with information (Emp name, date, start and end times), and i require a formulae to search the emp name, date, start and end times.

Please help

Thank you

Personnel No.First NameDateTimePunch Status
000008633Employee 12020-01-2818:30:17Check-Out
000008634Employee 22020-01-2818:24:47Check-Out
000008635Employee 32020-01-2818:23:23Check-Out
000008636Employee 42020-01-2818:20:06Check-Out
000008633Employee 12020-01-2812:50:37Check-In
000008635Employee 32020-01-2812:50:28Check-In
000008634Employee 22020-01-2808:29:16Check-In
000008636Employee 42020-01-2808:09:47Check-In
000008634Employee 22020-01-2719:30:17Check-Out
000008636Employee 42020-01-2719:20:06Check-Out
000008633Employee 12020-01-2718:18:49Check-Out
000008635Employee 32020-01-2717:51:01Check-Out
000008635Employee 32020-01-2707:50:37Check-In
000008634Employee 22020-01-2707:02:12Check-In
000008636Employee 42020-01-2705:42:34Check-In
000008633Employee 12020-01-2705:05:42Check-In
Results Sheet
2020-01-272020-01-272020-01-282020-01-28
Employee NameCheck-InCheck-OutCheck-InCheck-Out
Employee 1Formulae?Formulae?Formulae?Formulae?
Employee 207:02:1219:30:1708:29:1618:24:47
Employee 3
Employee 4
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
like this?
Min of TimeDatePunch Status
27/01/202028/01/2020
First NameCheck-InCheck-OutCheck-InCheck-Out
Employee 105:05:4218:18:4912:50:3718:30:17
Employee 207:02:1219:30:1708:29:1618:24:47
Employee 307:50:3717:51:0112:50:2818:23:23
Employee 405:42:3419:20:0608:09:4718:20:06
 
Upvote 0
Try this

Book1
ABCDE
1Personnel No.First NameDateTimePunch Status
2000008633Employee 128/01/202018:30:17Check-Out
3000008634Employee 228/01/202018:24:47Check-Out
4000008635Employee 328/01/202018:23:23Check-Out
5000008636Employee 428/01/202018:20:06Check-Out
6000008633Employee 128/01/202012:50:37Check-In
7000008635Employee 328/01/202012:50:28Check-In
8000008634Employee 228/01/202008:29:16Check-In
9000008636Employee 428/01/202008:09:47Check-In
10000008634Employee 227/01/202019:30:17Check-Out
11000008636Employee 427/01/202019:20:06Check-Out
12000008633Employee 127/01/202018:18:49Check-Out
13000008635Employee 327/01/202017:51:01Check-Out
14000008635Employee 327/01/202007:50:37Check-In
15000008634Employee 227/01/202007:02:12Check-In
16000008636Employee 427/01/202005:42:34Check-In
17000008633Employee 127/01/202005:05:42Check-In
18
19Results Sheet
2027/01/202027/01/202028/01/202028/01/2020
21Employee NameCheck-InCheck-OutCheck-InCheck-Out
22Employee 105:05:4218:18:4912:50:3718:30:17
23Employee 207:02:1219:30:1708:29:1618:24:47
24Employee 307:50:3717:51:0112:50:2818:23:23
25Employee 405:42:3419:20:0608:09:4718:20:06
Sheet1
Cell Formulas
RangeFormula
B22:E25B22=SUMIFS($D$2:$D$17,$B$2:$B$17,$A22,$C$2:$C$17,B$20,$E$2:$E$17,B$21)

Note that if an employee punches in twice, or out twice in the same day then the results will be incorrect. You could avoid this by using MINIFS or MAXIFS instead of SUMIFS as long as you are using excel 2019 or office 365. Older versions do not support these functions.
 
Upvote 0
Try this

Book1
ABCDE
1Personnel No.First NameDateTimePunch Status
2000008633Employee 128/01/202018:30:17Check-Out
3000008634Employee 228/01/202018:24:47Check-Out
4000008635Employee 328/01/202018:23:23Check-Out
5000008636Employee 428/01/202018:20:06Check-Out
6000008633Employee 128/01/202012:50:37Check-In
7000008635Employee 328/01/202012:50:28Check-In
8000008634Employee 228/01/202008:29:16Check-In
9000008636Employee 428/01/202008:09:47Check-In
10000008634Employee 227/01/202019:30:17Check-Out
11000008636Employee 427/01/202019:20:06Check-Out
12000008633Employee 127/01/202018:18:49Check-Out
13000008635Employee 327/01/202017:51:01Check-Out
14000008635Employee 327/01/202007:50:37Check-In
15000008634Employee 227/01/202007:02:12Check-In
16000008636Employee 427/01/202005:42:34Check-In
17000008633Employee 127/01/202005:05:42Check-In
18
19Results Sheet
2027/01/202027/01/202028/01/202028/01/2020
21Employee NameCheck-InCheck-OutCheck-InCheck-Out
22Employee 105:05:4218:18:4912:50:3718:30:17
23Employee 207:02:1219:30:1708:29:1618:24:47
24Employee 307:50:3717:51:0112:50:2818:23:23
25Employee 405:42:3419:20:0608:09:4718:20:06
Sheet1
Cell Formulas
RangeFormula
B22:E25B22=SUMIFS($D$2:$D$17,$B$2:$B$17,$A22,$C$2:$C$17,B$20,$E$2:$E$17,B$21)

Note that if an employee punches in twice, or out twice in the same day then the results will be incorrect. You could avoid this by using MINIFS or MAXIFS instead of SUMIFS as long as you are using excel 2019 or office 365. Older versions do not support these functions.
Thank you so much,

It works and i am most thankful indeed.
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,597
Members
449,038
Latest member
Arbind kumar

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