INDEX MATCH in a table (multiple lookups)

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
582
Office Version
  1. 365
Hi (and thanks, as ever in advance)

In cell E2 (of my look up sheet - named LOOKUP SHEET) I have the name of the column Header (located in Row 1 of my data table (Sheet is called DATA TABLE)

In cell B2 (of my look up sheet - named LOOKUP SHEET) I have the name of the value I want it to look up in the corresponding column above.

The Match I need will be directly to the right of the above. So :

LOOKUP SHEET

B2 - HORSE
E2 - ANIMAL

ANSWER REQUIRED : - 8735

DATA GRID

Column AColumn BColumn CColumn DColumn EColumn F
Row 1ColourColour(Lookup)FruitFruit(Lookup)AnimalAnimal(Lookup)
Row 2Red4563Banana2323Dog2443
Row 3Orange0025Pear4319Cat2315
Row 4Blue1599Apple6533Horse8735
Row 5Green9315Cherry8852Mouse1003
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Will the value you want to lookup (ie Horse) occur in multiple columns, or multiple rows?
 
Upvote 0
Will the value you want to lookup (ie Horse) occur in multiple columns, or multiple rows?

Potentially, yes. So it will need to ensure that it matches the row value (for the animal in this case)

Thanks !

(Iam guessing there is an INDEX MATCJ MATCH or something that could do it?
 
Upvote 0
Ok, how about
Excel Formula:
=INDEX(INDEX(Data!A2:F100,,MATCH(E2,Data!A1:F1,0)+1),MATCH(B2,INDEX(Data!A2:F100,,MATCH(E2,Data!A1:F1,0))))
 
Upvote 0
Have you changed the sheet name to match your sheet name?
 
Upvote 0
Have you changed the sheet name to match your sheet name?
Yes, the tab is named "Data". I have tried it on the master data, which is over a much bigger range, and a test sheet
Have you changed the sheet name to match your sheet name?
Oddly, if i change it the A2:F10 it works. If it is range A2:F100 I get a #N/A on my small sample data
 
Upvote 0
Not sure why that would happen, as it works for me
+Fluff 1.xlsm
ABCDEF
1ColourColour(Lookup)FruitFruit(Lookup)AnimalAnimal(Lookup)
2Red4563Banana2323Dog2443
3Orange25Pear4319Cat2315
4Blue1599Apple6533Horse8735
5Green9315Cherry8852Mouse1003
6
7
Data


+Fluff 1.xlsm
ABCDEF
1
2HorseAnimal8735
Summary
Cell Formulas
RangeFormula
F2F2=INDEX(INDEX(Data!A2:F100,,MATCH(E2,Data!A1:F1,0)+1),MATCH(B2,INDEX(Data!A2:F100,,MATCH(E2,Data!A1:F1,0))))


Try using the evaluate formula button on the formulas tab to see where the problem is
 
Upvote 0
Solution
Hi Fluff

Apologies, see what I did wrong now, where I copied my table in, I started the wider formula starting in A1 (in the data sheet) and not A2. Works perfectly now! Thanks for your help!(y)

Not sure why that would happen, as it works for me
+Fluff 1.xlsm
ABCDEF
1ColourColour(Lookup)FruitFruit(Lookup)AnimalAnimal(Lookup)
2Red4563Banana2323Dog2443
3Orange25Pear4319Cat2315
4Blue1599Apple6533Horse8735
5Green9315Cherry8852Mouse1003
6
7
Data


+Fluff 1.xlsm
ABCDEF
1
2HorseAnimal8735
Summary
Cell Formulas
RangeFormula
F2F2=INDEX(INDEX(Data!A2:F100,,MATCH(E2,Data!A1:F1,0)+1),MATCH(B2,INDEX(Data!A2:F100,,MATCH(E2,Data!A1:F1,0))))


Try using the evaluate formula button on the formulas tab to see where the problem is
 
Upvote 0
Glad it's sorted & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,695
Messages
6,126,263
Members
449,307
Latest member
Andile

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