INDEX MATCH when the target column is not known

tonkerthomas

Board Regular
Joined
Feb 12, 2014
Messages
56
I've tried to find another thread that deals with this topic, without success, so here goes:

I have a very large block of data: thousands of rows by hundreds of columns. I need to identify a known value in that block and return the value two cells to the right of it. I can use INDEX to ascertain which row of my data the value will be in, but it could be in any column. How do I locate the value, and how do I offset my return?

Example:

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Colhead1[/TD]
[TD]Colhead2[/TD]
[TD]Colhead3[/TD]
[TD]Colhead4[/TD]
[TD]Colhead5[/TD]
[TD]Colhead6[/TD]
[/TR]
[TR]
[TD]TeamA[/TD]
[TD]Dave[/TD]
[TD]Nigel[/TD]
[TD]Sarah[/TD]
[TD]Ryan[/TD]
[TD]Sally[/TD]
[TD]Gav[/TD]
[/TR]
[TR]
[TD]TeamB[/TD]
[TD]Eric[/TD]
[TD]Clive[/TD]
[TD]Agnes[/TD]
[TD]Bert[/TD]
[TD]Dora[/TD]
[TD]Rita[/TD]
[/TR]
[TR]
[TD]TeamC[/TD]
[TD]Katie[/TD]
[TD]Mary[/TD]
[TD]Jake[/TD]
[TD]Will[/TD]
[TD]Kiki[/TD]
[TD]Harry[/TD]
[/TR]
</tbody>[/TABLE]


I'm looking to find Clive, say, and want to return Bert. I know that Clive is in team B but I don't know where in the columns his name appears so I can't INDEX MATCH with Colhead2. I'm sure there's a way of doing this but I don't know how and an hour of Googling hasn't helped me. So, can you guys?

Thanks, as always, in advance for your help

Jeff
 
Last edited:

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
How about

+Fluff New.xlsm
ABCDEFGHIJK
1Colhead1Colhead2Colhead3Colhead4Colhead5Colhead6
2TeamADaveNigelSarahRyanSallyGavteamB
3TeamBEricCliveAgnesBertDoraRitaCliveBert
4TeamCKatieMaryJakeWillKikiHarry
Lookup
Cell Formulas
RangeFormula
K3K3=INDEX(B2:G4,MATCH(J2,A2:A4,0),MATCH(J3,INDEX(B2:G4,MATCH(J2,A2:A4,0),0),0)+2)
 
Last edited:
Upvote 0
Aha! An INDEX MATCH INDEX MATCH! That's logical, but sadly, too complicated for this bear of very little brain to figure out by himself. Thanks a million, Fluff - your time is very much appreciated.

Jeff
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0
try this =INDEX($A:$A,(ROW()-1)*3+COLUMN(A1)).
I used it to make print out available in 3 columns similar to Words print 'number of columns' excel2013
 
Upvote 0
Did you realise that this thread is over a year old?
Also you formula does not do what the OP was asking for.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
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