Index+Match/ Vlookup help

Demosassiner

New Member
Joined
Aug 13, 2017
Messages
7
Hi guys, hoping you can help with this. I currently have two tables, main and input/output below. I need a way to pull the "name" field that corresponds to the "main" code in the main table (which is in column D of input/output table). In other words, a formula to give me column E. Any ideas?

Main:
[TABLE="class: cms_table_grid"]
<tbody>[TR]
[TD]Row\Col[/TD]
[TD]
A​
[/TD]
[TD]
B​
[/TD]
[TD]
C​
[/TD]
[/TR]
[TR]
[TD]
1​
[/TD]
[TD]Name[/TD]
[TD]Code[/TD]
[TD]Number[/TD]
[/TR]
[TR]
[TD]
2​
[/TD]
[TD]Microsoft[/TD]
[TD]MSFT[/TD]
[TD]0005[/TD]
[/TR]
[TR]
[TD]
3​
[/TD]
[TD]Microsoft Ltd[/TD]
[TD]MICR[/TD]
[TD]0010[/TD]
[/TR]
[TR]
[TD]
4​
[/TD]
[TD]Apple Inc[/TD]
[TD]AAPL[/TD]
[TD]0005[/TD]
[/TR]
[TR]
[TD]
5​
[/TD]
[TD]Apple (Foreign)[/TD]
[TD]APLE[/TD]
[TD]0010[/TD]
[/TR]
[TR]
[TD]
6​
[/TD]
[TD]Apple Co.[/TD]
[TD]APCO[/TD]
[TD]0222[/TD]
[/TR]
[TR]
[TD]
7​
[/TD]
[TD]Facebook[/TD]
[TD]FCBK[/TD]
[TD]0050[/TD]
[/TR]
[TR]
[TD]
8​
[/TD]
[TD]Facebook Corp[/TD]
[TD]FBBC[/TD]
[TD]0010[/TD]
[/TR]
[TR]
[TD]
9​
[/TD]
[TD]Facebook LLC[/TD]
[TD]FACE[/TD]
[TD]0111[/TD]
[/TR]
</tbody>[/TABLE]




io (input and output, where output = main code)

[TABLE="class: cms_table_grid"]
<tbody>[TR]
[TD]Row\Col[/TD]
[TD]
A​
[/TD]
[TD]
B​
[/TD]
[TD]
C​
[/TD]
[TD]
D​
[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]
1​
[/TD]
[TD]Code[/TD]
[TD]Name[/TD]
[TD]Number[/TD]
[TD="bgcolor: #FFD966"]Main Code[/TD]
[TD="bgcolor: #FFD966"]Main Name[/TD]
[/TR]
[TR]
[TD]
2​
[/TD]
[TD]Micro[/TD]
[TD]Microsoft Inc[/TD]
[TD]0010[/TD]
[TD="bgcolor: #FFD966"]MICR[/TD]
[TD="bgcolor: #FFD966"]Microsoft Ltd[/TD]
[/TR]
[TR]
[TD]
3​
[/TD]
[TD]Apple123[/TD]
[TD]Apple[/TD]
[TD]0005[/TD]
[TD="bgcolor: #FFD966"]AAPL[/TD]
[TD="bgcolor: #FFD966"]Apple Inc[/TD]
[/TR]
[TR]
[TD]
4​
[/TD]
[TD]Fbook1[/TD]
[TD]Facebook Inc[/TD]
[TD]0010[/TD]
[TD="bgcolor: #FFD966"]FBBC[/TD]
[TD="bgcolor: #FFD966"]Facebook Corp[/TD]
[/TR]
</tbody>[/TABLE]


 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Where sheet1 has your main table.
Code:
=INDEX(Sheet1!$A$2:$A$9,MATCH(D2,Sheet1!$B$2:$B$9,0))
 
Upvote 0

Forum statistics

Threads
1,223,880
Messages
6,175,154
Members
452,615
Latest member
bogeys2birdies

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