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

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
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,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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