Rocket Spaceman
Rocket Spaceman

Reputation: 343

Excel - Replace matching column values based on another column set

I am wondering if there is a way to replace values in one column to new values from another column set. Like an auto search and replace confined to a column where the search/replace data is dictated by the column set from another excel file. Specifically here's the situation.

In one column I have old user IDs like so, which can't be sorted because it's a CSV for importing into a website and it has duplicates which each row represent new forum threads & replies etc:

7766
7779
7781
7782
7791
7792

I need to replace these values with the new correct values. I have two other columns in another excel file where I have the old member ID numbers next to it's corresponding new member ID number in ascending order, like this:

7066    637
7067    638
7068    639
7069    640
7070    641
7071    642
7072    643

The topic/thread file I manually used the search and replace function for all members which took a very long time... I'm wondering if there's an automated way to do this for the reply file? which has substantially more data rows. Thank you

Upvotes: 0

Views: 3368

Answers (1)

WCoaster
WCoaster

Reputation: 93

Have you tried vlookup? =VLOOKUP(C2,[Book2]Sheet1!$B$2:$C$8,2)

Where [Book2] is where your correct or new ID's are.

Upvotes: 1

Related Questions