Formula for searching for values in a column based on another column

fotherga

New Member
Joined
May 18, 2015
Messages
1
I'm relatively inexperienced in excel, and am hoping there is a formula or macro I can use for this. Here is a sample of my sheet:

Original IDNew IDOriginal IDNew ID
001001002
002002002
003004004
004005004
005007007
006010
007011
008012
009013

<tbody>
</tbody>


What I need to do is for each value in column 3, search column 1. When found in column 1, find the value in column 2 that is in the same row as the value in column 1. Then take this value from column 2, and paste it in column 4, in the same row as the started value of column 3.

Here is the resulting table:

Original IDNew IDOriginal IDNew ID
001001002002
002002002002
003004004005
004005004005
005007007011
006010
007011
008012
009013

<tbody>
</tbody>


All value are sorted, and are unique in column 1 and 2 but can be repeated in column 3 and 4. I can do this manually, but have a few thousand records to go through. Are there any suggestions?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Here you can use INDEX MATCH formula as under:
Excel 2007
ABCD
1Original IDNew IDOriginal IDNew ID
21122
32222
43445
54545
657711
7610
8711
9812
10913

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
D2=INDEX($A$2:$B$10,MATCH(C2,$A$2:$A$10,0),2)
D3=INDEX($A$2:$B$10,MATCH(C3,$A$2:$A$10,0),2)
D4=INDEX($A$2:$B$10,MATCH(C4,$A$2:$A$10,0),2)
D5=INDEX($A$2:$B$10,MATCH(C5,$A$2:$A$10,0),2)
D6=INDEX($A$2:$B$10,MATCH(C6,$A$2:$A$10,0),2)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Regards,

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,529
Messages
6,125,344
Members
449,219
Latest member
Smiqer

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