Formula Help - If/Then

Stapler1532

New Member
Joined
Aug 3, 2017
Messages
2
Example.png


I have 3 columns of data, and I want to edit the first column of data. How would I write a formula so that for each cell in the first column, it searches the second column for a match. If there is a match, then the first column cell is replaced by the corresponding third column cell. So for example, 100000 doesn't change because it does not appear in the second column (Child). 100001 appears in the second column, so it is replaced by the corresponding third column cell, which happens to also be 100001. However, 100005 ends up being replaced by 107547. There are more numbers/cells in the 2nd column than in the first, so to find a match from the first column to the second, it has to search the entire Child column -- it cant just search the same row. Thanks for the help in advance!
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Although your explanation in messed up, I believe what you are trying to do.

In cell B2 type =iferror(vlookup(A2,C:D,2,0),A2)

Let me know if I've understood it well and provided you with a viable solution. :)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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