VLookup Help on row headers rather than col_num

JONTYH26

New Member
Joined
Dec 14, 2018
Messages
6
Hello

Newbie so please bear with.

So, I want to pull a Value from a table using the lookup based on data in column A of a new sheet. I need to use the header rows of the table to find my Value as the number of columns will differ but the row header will not change. For example
[TABLE="width: 500"]
<tbody>[TR]
[TD]Unique Ref[/TD]
[TD]Col1[/TD]
[TD]Col2[/TD]
[TD]Col3[/TD]
[TD]Col4[/TD]
[/TR]
[TR]
[TD]ABCD[/TD]
[TD]100[/TD]
[TD]200[/TD]
[TD]300[/TD]
[TD]400[/TD]
[/TR]
[TR]
[TD]EFGH[/TD]
[TD]200[/TD]
[TD]300[/TD]
[TD]400[/TD]
[TD]500[/TD]
[/TR]
[TR]
[TD]IJKL[/TD]
[TD]300[/TD]
[TD]400[/TD]
[TD]500[/TD]
[TD]600[/TD]
[/TR]
[TR]
[TD]MNOP[/TD]
[TD]400[/TD]
[TD]500[/TD]
[TD]600[/TD]
[TD]700[/TD]
[/TR]
</tbody>[/TABLE]

I need to get the amount under Col2, with Basic as the name, by using the Unique Ref. A vlookup would work fine but if I want to paste new data over this, the value I need might be in Col3 but the coulmn Header, Basic, will still be the same.

Any insight will be greatly appreciated.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Something like

Excel 2013/2016
ABCDEFGHIJK
1Unique RefCol1Col2Col3Col4EFGH
2ABCD100200300400Col3400
3EFGH200300400500
4IJKL300400500600
5MNOP400500600700
Sheet2
Cell Formulas
RangeFormula
K2=INDEX($B$2:$E$5,MATCH(J1,$A$2:$A$5,0),MATCH(J2,$B$1:$E$1,0))
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,173
Members
453,021
Latest member
Justyna P

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