index/match based on a dynamic column header

JGARDNER-AIT

Board Regular
Joined
May 15, 2007
Messages
149
Hello - Is there a additonal formula I can add to an index/match formula to pull a value based on a dynamic column header name?

The indexed raw data can grow and shrink by column depending on project and was looking to automatically code in the coumn header vs hard coding the column number which will not work in a dynamically indexed raw data file.

To further explain what I'm looking for.
I have a part number 123456 in Cell A2 on sheet 1.
I want it to find in sheet 2 the 123456 in fixed column "b" and find a defined column header "description" and then intersect and find the value under the "description" column.
The column "description" could be the 2nd column in the index or the 50th column in the index.

Anyones help would be greatly appreciated.

Thanks - Josh
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Try:

=INDEX(Sheet2!A:Z,MATCH(A1,Sheet2!B:B,0),MATCH("description",Sheet2!1:1,0))

Adjust the INDEX Array (A:Z) to fit your data accordingly.
 
Upvote 0
Try:

=INDEX(Sheet2!A:Z,MATCH(A1,Sheet2!B:B,0),MATCH("description",Sheet2!1:1,0))

Adjust the INDEX Array (A:Z) to fit your data accordingly.

I know this is as on old post but what if the column header for column B in Sheet2 was also dynamic?
 
Upvote 0
Try:

=INDEX(Sheet2!A:Z,MATCH(A1,Sheet2!B:B,0),MATCH("description",Sheet2!1:1,0))

Adjust the INDEX Array (A:Z) to fit your data accordingly.
I have a similar type question. I have a column in a set of that comes to use dynamically (can be in a different column position each time the data is received). I am using the following formula:
=INDEX('Exported Data'!$A$1:$ZZ$800,MATCH($B10,'Exported Data'!$AG:$AG,0),MATCH('Condition Codes'!B$1,'Exported Data'!$1:$1,0)) where the data comes in the worksheet "Exported Data" and in the formula 'Exported Data'!$AG:$AG is the column that comes in dynamic. The header of the column is always the same "Rm # / Area".

How do I replace 'Exported Data'!$AG:$AG in my formula so that it looks for and assigns the column with the header "Rm # / Area"?
 
Upvote 0

Forum statistics

Threads
1,215,004
Messages
6,122,656
Members
449,091
Latest member
peppernaut

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