Multiple Criteria search

masterexcelbundle

New Member
Joined
Feb 9, 2022
Messages
7
Office Version
  1. 2016
Platform
  1. Windows
Hello,
This is probably very simple but I just can't figure it out!
Overall I want to know who supervising on the AM and PM shifts over the month by 5 consultants. I have filtered the data to the 'Available' status which is their Supervising status. I however don't want to include anyone who used it under 2hrs as they were probably just temping in and out.

So basically, I need to do a formula where is searches 5 separate columns for a matching date value, then from another 5 columns if duration is under 2hrs, and if other five columns match value "AM", then copy cell in column other columns.

I have uploaded 'DATA SETS1' as where the information is pulled from, using just 2 consultants but there are 3 others.
I have also uploaded 'DATA RESULTS' with the yellow cells how I am hoping the information to be pulled across as, either as AM or PM, also if the person is not listed on that date for the cell to show as blank. (e.g. if neither Adam or Chris worked on the 7th March, the cells under their names would be blank)

Thankyou in advance!
 

Attachments

  • DATA SETS1.PNG
    DATA SETS1.PNG
    72.4 KB · Views: 14
  • DATA RESULT.PNG
    DATA RESULT.PNG
    21.7 KB · Views: 16

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Where is the link for the upload?
Images really are not a good source for the forum to help you with. PLease use the xl2bb add in tool (link below) to share a mini workbook of you data.

Regarding your images. Where is the raw data that you have created the two data displays in the datasets1.png image?
 
Upvote 0
Hi,
Unfortunately I can't download the attachment as I am on a work computer and all downloads are blocked.

Raw data is pulled to individual tabs, which I have attached another picture. Grey columns are where I have formatted the data using formulas, white columns are the pulled data. I can only download one agent at a time so they currently have all their own individual tabs.
 

Attachments

  • rawdata.PNG
    rawdata.PNG
    52.6 KB · Views: 4
Upvote 0
post the data as a table then please. Pictures are problematic. It takes time for the people in the forum to recreate your scenario, and they can make typos will doing that. Help the forum help you!
 
Upvote 0
No worries, I have pasted the data as tables below. Hopefully thats more helpful.


Row LabelsSum of DurationMin of Start Time2Max of End TimeShiftLeader
1/03/2023
7:10:22​
4:53:00 AM​
1:01:00 PM​
AMADAM
6/03/2023
6:13:57​
4:55:00 AM​
1:30:00 PM​
AMADAM
7/03/2023
6:06:45​
10:59:00 AM​
7:00:00 PM​
PMADAM
8/03/2023
6:45:47​
6:22:00 AM​
2:55:00 PM​
AMADAM
9/03/2023
4:02:45​
4:56:00 AM​
10:07:00 AM​
AMADAM
10/03/2023
6:23:34​
4:57:00 AM​
1:30:00 PM​
AMADAM
11/03/2023
4:20:51​
5:54:00 AM​
12:36:00 PM​
AMADAM
12/03/2023
10:00:19​
5:56:00 AM​
4:37:00 PM​
AMADAM
13/03/2023
8:31:07​
4:53:00 AM​
2:15:00 PM​
AMADAM
14/03/2023
5:00:04​
5:23:00 AM​
1:30:00 PM​
AMADAM
20/03/2023
4:29:22​
5:00:00 AM​
11:01:00 AM​
AMADAM
24/03/2023
6:28:57​
4:58:00 AM​
1:31:00 PM​
AMADAM
25/03/2023
9:44:53​
5:57:00 AM​
4:33:00 PM​
AMADAM
26/03/2023
9:46:23​
5:55:00 AM​
4:31:00 PM​
AMADAM
27/03/2023
5:47:49​
5:00:00 AM​
1:32:00 PM​
AMADAM
28/03/2023
5:13:28​
4:56:00 AM​
1:36:00 PM​
AMADAM
29/03/2023
6:06:32​
3:55:00 AM​
12:30:00 PM​
AMADAM


Row LabelsSum of DurationMin of Start Time2Max of End TimeShiftLeader
28/02/2023
0:04:44​
11:58:00 PM​
12:03:00 AM​
PMCHRIS
1/03/2023
1:54:01​
3:58:00 PM​
12:14:00 AM​
PMCHRIS
8/03/2023
8:09:32​
2:24:00 PM​
11:47:00 PM​
PMCHRIS
9/03/2023
0:44:59​
3:58:00 PM​
12:11:00 AM​
PMCHRIS
10/03/2023
0:29:20​
4:04:00 PM​
11:13:00 PM​
PMCHRIS
11/03/2023
6:20:04​
1:57:00 PM​
12:08:00 AM​
PMCHRIS
12/03/2023
8:36:01​
1:55:00 PM​
12:10:00 AM​
PMCHRIS
24/03/2023
7:36:30​
3:53:00 PM​
12:01:00 AM​
PMCHRIS
25/03/2023
8:25:22​
11:55:00 AM​
10:09:00 PM​
PMCHRIS
26/03/2023
0:43:53​
12:01:00 PM​
9:31:00 PM​
PMCHRIS
28/03/2023
2:35:28​
4:01:00 PM​
11:27:00 PM​
PMCHRIS
29/03/2023
7:50:12​
3:54:00 PM​
12:15:00 AM​
PMCHRIS
2/03/2023
1:31:40​
3:56:00 PM​
10:14:00 PM​
PMCHRIS
15/03/2023
1:23:55​
4:04:00 PM​
12:00:00 AM​
PMCHRIS
16/03/2023
2:25:57​
12:54:00 PM​
10:18:00 PM​
PMCHRIS
22/03/2023
1:17:04​
3:55:00 PM​
11:52:00 PM​
PMCHRIS
23/03/2023
2:12:49​
4:04:00 PM​
12:01:00 AM​
PMCHRIS
30/03/2023
3:42:50​
12:38:00 PM​
9:15:00 PM​
PMCHRIS


ADAMCHRIS
1/03/2023​
AM - ExamplePM - Example
2/03/2023​
3/03/2023​
4/03/2023​
5/03/2023​
6/03/2023​
7/03/2023​
8/03/2023​
9/03/2023​
10/03/2023​
11/03/2023​
12/03/2023​
13/03/2023​
14/03/2023​
15/03/2023​
16/03/2023​
17/03/2023​
18/03/2023​
19/03/2023​
20/03/2023​
21/03/2023​
22/03/2023​
23/03/2023​
24/03/2023​
25/03/2023​
26/03/2023​
27/03/2023​
28/03/2023​
29/03/2023​
30/03/2023​
31/03/2023​
 
Upvote 0
yes, now the forum can try to figure this out for you.
 
Upvote 0
No worries, I have pasted the data as tables below. Hopefully thats more helpful.


Row LabelsSum of DurationMin of Start Time2Max of End TimeShiftLeader
1/03/2023
7:10:22​
4:53:00 AM​
1:01:00 PM​
AMADAM
6/03/2023
6:13:57​
4:55:00 AM​
1:30:00 PM​
AMADAM
7/03/2023
6:06:45​
10:59:00 AM​
7:00:00 PM​
PMADAM
8/03/2023
6:45:47​
6:22:00 AM​
2:55:00 PM​
AMADAM
9/03/2023
4:02:45​
4:56:00 AM​
10:07:00 AM​
AMADAM
10/03/2023
6:23:34​
4:57:00 AM​
1:30:00 PM​
AMADAM
11/03/2023
4:20:51​
5:54:00 AM​
12:36:00 PM​
AMADAM
12/03/2023
10:00:19​
5:56:00 AM​
4:37:00 PM​
AMADAM
13/03/2023
8:31:07​
4:53:00 AM​
2:15:00 PM​
AMADAM
14/03/2023
5:00:04​
5:23:00 AM​
1:30:00 PM​
AMADAM
20/03/2023
4:29:22​
5:00:00 AM​
11:01:00 AM​
AMADAM
24/03/2023
6:28:57​
4:58:00 AM​
1:31:00 PM​
AMADAM
25/03/2023
9:44:53​
5:57:00 AM​
4:33:00 PM​
AMADAM
26/03/2023
9:46:23​
5:55:00 AM​
4:31:00 PM​
AMADAM
27/03/2023
5:47:49​
5:00:00 AM​
1:32:00 PM​
AMADAM
28/03/2023
5:13:28​
4:56:00 AM​
1:36:00 PM​
AMADAM
29/03/2023
6:06:32​
3:55:00 AM​
12:30:00 PM​
AMADAM


Row LabelsSum of DurationMin of Start Time2Max of End TimeShiftLeader
28/02/2023
0:04:44​
11:58:00 PM​
12:03:00 AM​
PMCHRIS
1/03/2023
1:54:01​
3:58:00 PM​
12:14:00 AM​
PMCHRIS
8/03/2023
8:09:32​
2:24:00 PM​
11:47:00 PM​
PMCHRIS
9/03/2023
0:44:59​
3:58:00 PM​
12:11:00 AM​
PMCHRIS
10/03/2023
0:29:20​
4:04:00 PM​
11:13:00 PM​
PMCHRIS
11/03/2023
6:20:04​
1:57:00 PM​
12:08:00 AM​
PMCHRIS
12/03/2023
8:36:01​
1:55:00 PM​
12:10:00 AM​
PMCHRIS
24/03/2023
7:36:30​
3:53:00 PM​
12:01:00 AM​
PMCHRIS
25/03/2023
8:25:22​
11:55:00 AM​
10:09:00 PM​
PMCHRIS
26/03/2023
0:43:53​
12:01:00 PM​
9:31:00 PM​
PMCHRIS
28/03/2023
2:35:28​
4:01:00 PM​
11:27:00 PM​
PMCHRIS
29/03/2023
7:50:12​
3:54:00 PM​
12:15:00 AM​
PMCHRIS
2/03/2023
1:31:40​
3:56:00 PM​
10:14:00 PM​
PMCHRIS
15/03/2023
1:23:55​
4:04:00 PM​
12:00:00 AM​
PMCHRIS
16/03/2023
2:25:57​
12:54:00 PM​
10:18:00 PM​
PMCHRIS
22/03/2023
1:17:04​
3:55:00 PM​
11:52:00 PM​
PMCHRIS
23/03/2023
2:12:49​
4:04:00 PM​
12:01:00 AM​
PMCHRIS
30/03/2023
3:42:50​
12:38:00 PM​
9:15:00 PM​
PMCHRIS


ADAMCHRIS
1/03/2023​
AM - ExamplePM - Example
2/03/2023​
3/03/2023​
4/03/2023​
5/03/2023​
6/03/2023​
7/03/2023​
8/03/2023​
9/03/2023​
10/03/2023​
11/03/2023​
12/03/2023​
13/03/2023​
14/03/2023​
15/03/2023​
16/03/2023​
17/03/2023​
18/03/2023​
19/03/2023​
20/03/2023​
21/03/2023​
22/03/2023​
23/03/2023​
24/03/2023​
25/03/2023​
26/03/2023​
27/03/2023​
28/03/2023​
29/03/2023​
30/03/2023​
31/03/2023​
What does the column 'sum of duration' represent as I noticed this column does not match the difference in time between: Min of Start Time and Max of End Time?
 
Upvote 0
ok, try this:

mr excel questions 22.xlsm
ABCDEFGHIJ
1Row LabelsSum of DurationMin of Start Time2Max of End TimeShiftLeaderADAMCHRIS
22023-03-0107:10:2204:53:0013:01:00AMADAM2023-03-01AMPM
32023-03-0606:13:5704:55:0013:30:00AMADAM2023-03-02 PM
42023-03-0706:06:4510:59:0019:00:00PMADAM2023-03-03  
52023-03-0806:45:4706:22:0014:55:00AMADAM2023-03-04  
62023-03-0904:02:4504:56:0010:07:00AMADAM2023-03-05  
72023-03-1006:23:3404:57:0013:30:00AMADAM2023-03-06AM 
82023-03-1104:20:5105:54:0000:36:00AMADAM2023-03-07PM 
92023-03-1210:00:1905:56:0016:37:00AMADAM2023-03-08AMPM
102023-03-1308:31:0704:53:0014:15:00AMADAM2023-03-09AMPM
112023-03-1405:00:0405:23:0013:30:00AMADAM2023-03-10AMPM
122023-03-2004:29:2205:00:0011:01:00AMADAM2023-03-11AMPM
132023-03-2406:28:5704:58:0013:31:00AMADAM2023-03-12AMPM
142023-03-2509:44:5305:57:0016:33:00AMADAM2023-03-13AM 
152023-03-2609:46:2305:55:0016:31:00AMADAM2023-03-14AM 
162023-03-2705:47:4905:00:0013:32:00AMADAM2023-03-15 PM
172023-03-2805:13:2804:56:0013:36:00AMADAM2023-03-16 PM
182023-03-2906:06:3203:55:0000:30:00AMADAM2023-03-17  
192023-02-2800:04:4423:58:0012:03:00PMCHRIS2023-03-18  
202023-03-0101:54:0115:58:0012:14:00PMCHRIS2023-03-19  
212023-03-0808:09:3214:24:0023:47:00PMCHRIS2023-03-20AM 
222023-03-0900:44:5915:58:0012:11:00PMCHRIS2023-03-21  
232023-03-1000:29:2016:04:0023:13:00PMCHRIS2023-03-22 PM
242023-03-1106:20:0413:57:0012:08:00PMCHRIS2023-03-23 PM
252023-03-1208:36:0113:55:0012:10:00PMCHRIS2023-03-24AMPM
262023-03-2407:36:3015:53:0012:01:00PMCHRIS2023-03-25AMPM
272023-03-2508:25:2211:55:0022:09:00PMCHRIS2023-03-26AMPM
282023-03-2600:43:5300:01:0021:31:00PMCHRIS2023-03-27AM 
292023-03-2802:35:2816:01:0023:27:00PMCHRIS2023-03-28AMPM
302023-03-2907:50:1215:54:0012:15:00PMCHRIS2023-03-29AMPM
312023-03-0201:31:4015:56:0022:14:00PMCHRIS2023-03-30 PM
322023-03-1501:23:5516:04:0012:00:00PMCHRIS2023-03-31  
332023-03-1602:25:5700:54:0022:18:00PMCHRIS  
342023-03-2201:17:0415:55:0023:52:00PMCHRIS  
352023-03-2302:12:4916:04:0012:01:00PMCHRIS  
362023-03-3003:42:5000:38:0021:15:00PMCHRIS  
masterexcelbundle
Cell Formulas
RangeFormula
I2:J36I2=IFERROR(INDEX($E$2:$E$36,MATCH($H2&I$1,$A$2:$A$36&$F$2:$F$36,0)),"")
 
Upvote 0
What does the column 'sum of duration' represent as I noticed this column does not match the difference in time between: Min of Start Time and Max of End Time?
@MEUserII , I think there are some extraneous columns. From what I gather he only wants to get what shift people are on per day. The column in question may be on whether they have two hours of time or not, but that is my next step in the process.
 
Upvote 0
I think this checks for shifts of 2hrs or longer:
had an error getting it corrected:
updated

mr excel questions 22.xlsm
ABCDEFGHIJ
1Row LabelsSum of DurationMin of Start Time2Max of End TimeShiftLeaderADAMCHRIS
22023-03-0107:10:2204:53:0013:01:00AMADAM2023-03-01AMPM
32023-03-0606:13:5704:55:0013:30:00AMADAM2023-03-02 PM
42023-03-0706:06:4510:59:0019:00:00PMADAM2023-03-03  
52023-03-0806:45:4706:22:0014:55:00AMADAM2023-03-04  
62023-03-0904:02:4504:56:0010:07:00AMADAM2023-03-05  
72023-03-1006:23:3404:57:0013:30:00AMADAM2023-03-06AM 
82023-03-1104:20:5105:54:0000:36:00AMADAM2023-03-07PM 
92023-03-1210:00:1905:56:0016:37:00AMADAM2023-03-08AMPM
102023-03-1308:31:0704:53:0014:15:00AMADAM2023-03-09AMPM
112023-03-1405:00:0405:23:0013:30:00AMADAM2023-03-10AMPM
122023-03-2004:29:2205:00:0011:01:00AMADAM2023-03-11AMPM
132023-03-2406:28:5704:58:0013:31:00AMADAM2023-03-12AMPM
142023-03-2509:44:5305:57:0016:33:00AMADAM2023-03-13AM 
152023-03-2609:46:2305:55:0016:31:00AMADAM2023-03-14AM 
162023-03-2705:47:4905:00:0013:32:00AMADAM2023-03-15 PM
172023-03-2805:13:2804:56:0013:36:00AMADAM2023-03-16 PM
182023-03-2906:06:3203:55:0000:30:00AMADAM2023-03-17  
192023-02-2800:04:4423:58:0012:03:00PMCHRIS2023-03-18  
202023-03-0101:54:0115:58:0012:14:00PMCHRIS2023-03-19  
212023-03-0808:09:3214:24:0023:47:00PMCHRIS2023-03-20AM 
222023-03-0900:44:5915:58:0012:11:00PMCHRIS2023-03-21  
232023-03-1000:29:2016:04:0023:13:00PMCHRIS2023-03-22  
242023-03-1106:20:0413:57:0012:08:00PMCHRIS2023-03-23 PM
252023-03-1208:36:0113:55:0012:10:00PMCHRIS2023-03-24AMPM
262023-03-2407:36:3015:53:0012:01:00PMCHRIS2023-03-25AMPM
272023-03-2508:25:2211:55:0022:09:00PMCHRIS2023-03-26AMPM
282023-03-2600:43:5300:01:0021:31:00PMCHRIS2023-03-27  
292023-03-2802:35:2816:01:0023:27:00PMCHRIS2023-03-28AMPM
302023-03-2907:50:1215:54:0012:15:00PMCHRIS2023-03-29AMPM
312023-03-0201:31:4015:56:0022:14:00PMCHRIS2023-03-30  
322023-03-1501:23:5516:04:0012:00:00PMCHRIS2023-03-31  
332023-03-1602:25:5700:54:0022:18:00PMCHRIS  
342023-03-2201:17:0415:55:0023:52:00PMCHRIS  
352023-03-2302:12:4916:04:0012:01:00PMCHRIS  
362023-03-3003:42:5000:38:0021:15:00PMCHRIS  
masterexcelbundle
Cell Formulas
RangeFormula
I2:J36I2=IF($B2>=TIME(2,0,0),IFERROR(INDEX($E$2:$E$36,MATCH($H2&I$1,$A$2:$A$36&$F$2:$F$36,0)),""),"")
 
Upvote 0

Forum statistics

Threads
1,214,525
Messages
6,120,051
Members
448,940
Latest member
mdusw

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