Complicated lookup reference in table

BigTenBoy15

New Member
Joined
Feb 24, 2016
Messages
9
Hello! Need some help with a dynamic lookup reference, likely using some sort of Index/Match combination as I'm trying to lookup a player name in a table based on his position and team name. For example, if I use the table below, the row reference in the first Match can only be B2:B16 or D2:D16, but I want it to be one or the other depending on the name in row one (Team 1 or Team 2). So if I'm trying to lookup the player associated with RB2 on Team 2, then I'd have to change the row reference in the Match formula. Is there any way to do this with a formula and without a macro?
ABCD
1​
Team 1Team 2
2​
Dak PrescottQB1Carson WentzQB1
3​
Jameis WinstonQB2Ezekiel ElliottRB1
4​
James ConnerRB1Aaron JonesRB2
5​
Joe MixonRB2Devin SingletaryRB3
6​
Sony MichelRB3Miles SandersRB4
7​
Matt BreidaRB4Chris ThompsonRB5
8​
Jaylen SamuelsRB5Tyrell WilliamsWR1
9​
Amari CooperWR1Sterling ShepardWR2
10​
Deebo SamuelWR2Kenny StillsWR3
11​
Zach PascalWR3Breshad PerrimanWR4
12​
Robby AndersonWR4Mark AndrewsTE1
13​
Diontae JohnsonWR5Darren WallerTE2
14​
Jacob HollisterTE1Buffalo BillsDEF1
15​
Tennessee TitansDEF1Green Bay PackersDEF2
16​
Kansas City ChiefsDEF2Chicago BearsDEF3
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Try:

Book1
ABCDEFGHI
1Team 1Team 2TeamPositionPlayer
2Dak PrescottQB1Carson WentzQB1Team 2RB4Miles Sanders
3Jameis WinstonQB2Ezekiel ElliottRB1
4James ConnerRB1Aaron JonesRB2
5Joe MixonRB2Devin SingletaryRB3
6Sony MichelRB3Miles SandersRB4
7Matt BreidaRB4Chris ThompsonRB5
8Jaylen SamuelsRB5Tyrell WilliamsWR1
9Amari CooperWR1Sterling ShepardWR2
10Deebo SamuelWR2Kenny StillsWR3
11Zach PascalWR3Breshad PerrimanWR4
12Robby AndersonWR4Mark AndrewsTE1
13Diontae JohnsonWR5Darren WallerTE2
14Jacob HollisterTE1Buffalo BillsDEF1
15Tennessee TitansDEF1Green Bay PackersDEF2
16Kansas City ChiefsDEF2Chicago BearsDEF3
Sheet5
Cell Formulas
RangeFormula
I2I2=INDEX(A2:C16,MATCH(H2,INDEX(B2:D16,0,MATCH(G2,A1:C1,0)),0),MATCH(G2,A1:C1,0))
 
Upvote 0

Forum statistics

Threads
1,214,790
Messages
6,121,607
Members
449,037
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