Look up in a table, and return the value of the first row.

NNO123

New Member
Joined
Dec 29, 2017
Messages
4
Hi guys,
I dont think this one is difficult, but I cannot find a good solution :)
Maybe one of you can help :)

I have a big table:

[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]String[/TD]
[TD]String[/TD]
[TD]STring[/TD]
[TD]String[/TD]
[TD]String[/TD]
[/TR]
[TR]
[TD]String[/TD]
[TD]STring[/TD]
[TD]STring[/TD]
[TD]String[/TD]
[TD]STring[/TD]
[/TR]
[TR]
[TD]String[/TD]
[TD]String[/TD]
[TD]String[/TD]
[TD]String[/TD]
[TD]String[/TD]
[/TR]
[TR]
[TD]String[/TD]
[TD]STring[/TD]
[TD]String[/TD]
[TD]String[/TD]
[TD]STring[/TD]
[/TR]
</tbody>[/TABLE]


So in the table I have texts. I want a function, where I can search for a name, and then the function must return the value of the first row.
So Fx, if I find a match in A4, I want it to return the value of cell A1.

Any ideas?
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Searching across a range is hard and needs an array formula and an INDIRECT() for the only way I know:


Book1
ABCDEFGH
1ApplesGrapesOrangesBananasCherriesLook for:OCIF
2GYGUMQFXVQPFIRNJUPAAHeader:Bananas
3YDBZXHBXUKTPSDHYWPBD
4SFMLMXUGDRMAMFHATZHE
5NUKQNLTXXDLCOCIFLSIL
6YFIVGVISHVTSQIJZVYFM
7DMGPLEIASHRRVWKBUTTY
8RTDJWFQQAYJGAWQTDHQC
Sheet1
Cell Formulas
RangeFormula
H2{=INDIRECT("R1C"&MIN(IF(ISNUMBER(SEARCH($H$1,$A$2:$E$8)),COLUMN($A$2:$E$8))),FALSE)}
Press CTRL+SHIFT+ENTER to enter array formulas.


WBD
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,164
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