Return a Vllokup for a column value not knowing where the column in question is.

Richard_

New Member
Joined
Mar 4, 2016
Messages
12
Hello There

I'm hoping this is going to be a relatively easy question to answer. My head hurts trying it though. so please Can someone help?

The problem is I have the unique reference down the side in column A (A2-A4000) going downwards and I want to return the data from another sheet based on the column headings going across. - (No problem a VLOOKUP) however,
The spreadsheet I'm drawing the answer from is huge 800 columns and the headed columns are all mixed up on the two sheets (but the headings are the same)

Does anyone know of a formula that can help me return a value using my Column A value against my mixed up Row headings in Row 1 please?

Thanks in advance.

Rich
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Richard,

You can use an INDEX MATCH and MATCH. INDEX lets you retrieve from a grid by specifying the row (we can find this using MATCH on the unique reference in column A) and the column (by using MATCH to find a matching column on both sheets).

Here's my test data "AnotherSheet" with the possible 800 columns:

Book1
ABCDEF
1ReferenceMineralPlasmaAnimalAnti-MatterVegetable
2XX-794Z/40Z/23Z/34Z/80Z/77
3XX-236Z/91Z/69Z/86Z/25Z/64
4XX-726Z/57Z/49Z/44Z/58Z/80
5XX-395Z/92Z/35Z/19Z/89Z/35
6XX-303Z/58Z/19Z/51Z/78Z/18
7XX-819Z/81Z/9Z/80Z/29Z/12
8XX-528Z/58Z/71Z/31Z/57Z/28
9XX-292Z/27Z/53Z/57Z/1Z/54
10XX-248Z/27Z/88Z/15Z/67Z/48
AnotherSheet


Now for my main sheet I'll put the INDEX MATCH and MATCH into each cell where I want to retrieve a matching reference/heading:

Book1
ABCD
1ReferenceAnimalVegetableMineral
2XX-248Z/15Z/48Z/27
3XX-794Z/34Z/77Z/40
4XX-726Z/44Z/80Z/57
5XX-395Z/19Z/35Z/92
6XX-303Z/51Z/18Z/58
Sheet1
Cell Formulas
RangeFormula
B2:D6B2=INDEX(AnotherSheet!$B$2:$XFD$4000,MATCH($A2,AnotherSheet!$A$2:$A$4000,0),MATCH(B$1,AnotherSheet!$B$1:$ADT$1,0))
 
Upvote 0
Thank-you for your response Toadstool - I will be giving it a go tomorrow at work
I also came up with : that seems to work as long as I add in the column numbers in across the page;
.=VLOOKUP(A3,Sheet1!$A$3:$AZF$2017,HLOOKUP(A$2,Sheet1!$A$2:$AZF$2017,2,FALSE),FALSE)
essentially its for trying to create an upload of data from a suppliers sheet when the their data pulled out doesn't quite match the column data on our system to upload it back in. So many thanks for the help. :)
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,535
Members
449,037
Latest member
tmmotairi

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