vlookup / Indexing

cmcclean

New Member
Joined
Dec 19, 2018
Messages
2
I'm looking for a function to populate column 'Hold1'.
If a value in Ref2 is present in Ref1, then populate Hold1 with the corresponding value in Hold2

[TABLE="width: 488"]
<tbody>[TR]
[TD]Ref1[/TD]
[TD]Hold1[/TD]
[TD][/TD]
[TD]Ref2[/TD]
[TD]Hold2[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD][/TD]
[TD][/TD]
[TD]5[/TD]
[TD]35[/TD]
[/TR]
[TR]
[TD]21[/TD]
[TD][/TD]
[TD][/TD]
[TD]23[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]58[/TD]
[TD][/TD]
[TD][/TD]
[TD]56[/TD]
[TD]16[/TD]
[/TR]
[TR]
[TD]23[/TD]
[TD][/TD]
[TD][/TD]
[TD]15[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD]87[/TD]
[TD]25[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD][/TD]
[TD][/TD]
[TD]60[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]89[/TD]
[TD][/TD]
[TD][/TD]
[TD]65[/TD]
[TD]13[/TD]
[/TR]
[TR]
[TD]95[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]34[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]65[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]22[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


The completed table will look like this:
[TABLE="width: 488"]
<tbody>[TR]
[TD]Ref1[/TD]
[TD]Hold1[/TD]
[TD][/TD]
[TD]Ref2[/TD]
[TD]Hold2[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]9[/TD]
[TD][/TD]
[TD]5[/TD]
[TD]35[/TD]
[/TR]
[TR]
[TD]21[/TD]
[TD]0[/TD]
[TD][/TD]
[TD]23[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]58[/TD]
[TD]0[/TD]
[TD][/TD]
[TD]56[/TD]
[TD]16[/TD]
[/TR]
[TR]
[TD]23[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]15[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]0[/TD]
[TD][/TD]
[TD]87[/TD]
[TD]25[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]0[/TD]
[TD][/TD]
[TD]60[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]89[/TD]
[TD]0[/TD]
[TD][/TD]
[TD]65[/TD]
[TD]13[/TD]
[/TR]
[TR]
[TD]95[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]34[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]65[/TD]
[TD]13[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]22[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Try

Excel 2013/2016
ABCDE
1Ref1Hold1Ref2Hold2
2159535
3210232
45805616
5232159
6208725
7100601
88906513
9950
10340
116513
12159
1390
14220
Sheet2
Cell Formulas
RangeFormula
B2=IFERROR(INDEX($E$2:$E$8,MATCH(A2,$D$2:$D$8,0)),0)
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

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