Index and match with multiple criteria

leonp

New Member
Joined
Sep 9, 2016
Messages
19
I have three data tables (see below).


  • The first one (A1:H12) shows the employee name and whether they are in work on a given day
  • The second one (J1:P12) shows what job role they are working on a given day
  • The third one (R1:X12) shows what line they are working on

What I need to do is populate the tables below these (A17:E23and A26:E32). I.e. for line one Mondaymanning I need to pull in the names of the people working in each role.

I think it may be some form of index and match formula Iwould need but I can’t figure it out for the life of me. Can anyone help?

Thanks!

LINE ROLE LINE
NameMonTueWedThuFriSatSunMonTueWedThuFriSatSunMonTueWedThuFriSatSun
John A
John B WWWW Job 1Job 1Job 1Job 1 1111
John C WWWWW Job 1Job 1Job 1Job 1Job 1 22222
John DWWWW WJob 2Job 2Job 2Job 2 Job 21511 1
John EWWW WJob 2Job 2Job 2 Job 2111 1
John FWWWW WJob 3Job 3Job 3Job 3 Job 31111 1
John G WWWWW Job 3Job 3Job 3Job 3Job 3 11111
John HWWWW WJob 3Job 3Job 3Job 3 Job 31111 1
John I WWWWW Job 4Job 4Job 4Job 4Job 4 11111
John J
Line 1 manning - MondayHeadcountEmployees
Job 10
Job 22John DJohn E
Job 32John FJohn H
Job 40
Line 2 manning - Tuesday
HeadcountEmployees
Job 10
Job 21John E
Job 33John FJohn GJohn H
Job 41John I

<colgroup><col width="156" style="width: 117pt; mso-width-source: userset; mso-width-alt: 5705;"> <col width="69" style="width: 52pt; mso-width-source: userset; mso-width-alt: 2523;"> <col width="72" style="width: 54pt; mso-width-source: userset; mso-width-alt: 2633;"> <col width="48" style="width: 36pt; mso-width-source: userset; mso-width-alt: 1755;" span="5"> <col width="64" style="width: 48pt;"> <col width="57" style="width: 43pt; mso-width-source: userset; mso-width-alt: 2084;" span="7"> <col width="64" style="width: 48pt;"> <col width="55" style="width: 41pt; mso-width-source: userset; mso-width-alt: 2011;" span="7"> <tbody>
</tbody>



xwAAAAAAJRZxH8BCYfleAimhXUAAAAASUVORK5CYII=
 
Last edited:

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Apologies for the poor formatting, I've tried to use some of the suggested tools for pasting small tables as per the forum rules but am unable to download any of the tools due to restrictions at work
 
Upvote 0
How about


Book1
ABCDEFGHIJKLMNOPQRSTUVWX
1
2NameMonTueWedThuFriSatSunMonTueWedThuFriSatSunMonTueWedThuFriSatSun
3John A
4John BWWWWJob 1Job 1Job 1Job 11111
5John CWWWWWJob 1Job 1Job 1Job 1Job 122222
6John DWWWWWJob 2Job 2Job 2Job 2Job 215111
7John EWWWWJob 2Job 2Job 2Job 21111
8John FWWWWWJob 3Job 3Job 3Job 3Job 311111
9John GWWWWWJob 3Job 3Job 3Job 3Job 311111
10John HWWWWWJob 3Job 3Job 3Job 3Job 311111
11John IWWWWWJob 4Job 4Job 4Job 4Job 411111
12John J
13
14
15
16
17Line 1 manning - MondayHeadcountEmployees
18
19Job 10    
20Job 22John DJohn E
21Job 32John FJohn H
22Job 40
End
Cell Formulas
RangeFormula
B19=COUNTIFS($J$3:$J$12,A19,$R$3:$R$12,1)
C19=IFERROR(INDEX($A$3:$A$12,AGGREGATE(15,6,(ROW($A$3:$A$12)-ROW($A$3)+1)/(($J$3:$J$12=$A19)*($R$3:$R$12=1)),COLUMNS($A$1:A$1))),"")
D19=IFERROR(INDEX($A$3:$A$12,AGGREGATE(15,6,(ROW($A$3:$A$12)-ROW($A$3)+1)/(($J$3:$J$12=$A19)*($R$3:$R$12=1)),COLUMNS($A$1:B$1))),"")
E19=IFERROR(INDEX($A$3:$A$12,AGGREGATE(15,6,(ROW($A$3:$A$12)-ROW($A$3)+1)/(($J$3:$J$12=$A19)*($R$3:$R$12=1)),COLUMNS($A$1:C$1))),"")
F19=IFERROR(INDEX($A$3:$A$12,AGGREGATE(15,6,(ROW($A$3:$A$12)-ROW($A$3)+1)/(($J$3:$J$12=$A19)*($R$3:$R$12=1)),COLUMNS($A$1:D$1))),"")
 
Upvote 0

Forum statistics

Threads
1,214,886
Messages
6,122,093
Members
449,064
Latest member
Danger_SF

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