Index Match where both row and column are dynamic

jimbomcmucka

New Member
Joined
Oct 11, 2022
Messages
24
Office Version
  1. 365
Platform
  1. Windows
Hey all,

This is my first post, but have used the forum loads in the past to find help with my excel problems. I'm hoping you can help with a problem. Forgive me if I am not explaining the issue very well.

I have created the below formula to retrieve some data from an extract, housed in a different tab:
=INDEX('OTMM ISM Data Extract'!1:1048576,MATCH(B2,'OTMM ISM Data Extract'!E:E,0),MATCH("Assembled Depth Value",'OTMM ISM Data Extract'!$A$1:$MA$1,0))

It works fine, however I have hit an issue. It turns out the extract that is dumped into the other tab doesn't order its columns consistently. So, I need a way to make this look up the row for the column named "GTIN".

Thanks in advance for any suggestions!!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi & welcome to MrExcel.
How about
Excel Formula:
=INDEX('OTMM ISM Data Extract'!A:MA,MATCH(B2,INDEX('OTMM ISM Data Extract'!A:MA,,MATCH("GTIN",'OTMM ISM Data Extract'!A1:MA1,0)),0),MATCH("Assembled Depth Value",'OTMM ISM Data Extract'!$A$1:$MA$1,0))
 
Upvote 0
Solution
Hi & welcome to MrExcel.
How about
Excel Formula:
=INDEX('OTMM ISM Data Extract'!A:MA,MATCH(B2,INDEX('OTMM ISM Data Extract'!A:MA,,MATCH("GTIN",'OTMM ISM Data Extract'!A1:MA1,0)),0),MATCH("Assembled Depth Value",'OTMM ISM Data Extract'!$A$1:$MA$1,0))
You are my hero!

Thanks so much, worked an absolute charm.

Cheers!
Jim
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
If interested, I think that you could shorten that to
Excel Formula:
=LET(r,'OTMM ISM Data Extract'!A:MA,r_1,INDEX(r,1,0),INDEX(r,MATCH(B2,INDEX(r,,MATCH("GTIN",r_1,0)),0),MATCH("Assembled Depth Value",r_1,0)))
 
Upvote 0

Forum statistics

Threads
1,214,516
Messages
6,119,976
Members
448,934
Latest member
audette89

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