kmprice710
Board Regular
- Joined
- Jan 8, 2014
- Messages
- 87
- Office Version
- 2019
- Platform
- Windows
I have a spreadsheet that looks like this:
[TABLE="class: grid, width: 512"]
<colgroup><col span="8"></colgroup><tbody>[TR]
[TD]old_ID
[/TD]
[TD]new_ID
[/TD]
[TD][/TD]
[TD]badid[/TD]
[TD]old_ID[/TD]
[TD][/TD]
[TD]new_ID[/TD]
[TD]current_ID
[/TD]
[/TR]
[TR]
[TD]adams1
[/TD]
[TD="colspan: 2"]ma000262
[/TD]
[TD]gerger[/TD]
[TD]adams1[/TD]
[TD][/TD]
[TD][/TD]
[TD]gerger[/TD]
[/TR]
[TR]
[TD]akin1[/TD]
[TD]za000804[/TD]
[TD][/TD]
[TD]ynytn[/TD]
[TD]akin1[/TD]
[TD][/TD]
[TD][/TD]
[TD]ynytn[/TD]
[/TR]
[TR]
[TD]aly1[/TD]
[TD]ca001425[/TD]
[TD][/TD]
[TD]wdwwef
[/TD]
[TD]aly1[/TD]
[TD][/TD]
[TD][/TD]
[TD]wdwwef[/TD]
[/TR]
[TR]
[TD]amerau1[/TD]
[TD]ca001480[/TD]
[TD][/TD]
[TD]tryjyj[/TD]
[TD]amerau1[/TD]
[TD][/TD]
[TD][/TD]
[TD]adams1[/TD]
[/TR]
[TR]
[TD]ashburn1
[/TD]
[TD]ba002831
[/TD]
[TD][/TD]
[TD]yukuy[/TD]
[TD]ashburn1[/TD]
[TD][/TD]
[TD][/TD]
[TD]akin1[/TD]
[/TR]
[TR]
[TD]avery1
[/TD]
[TD]ha111680[/TD]
[TD][/TD]
[TD]verevv[/TD]
[TD]avery1[/TD]
[TD][/TD]
[TD][/TD]
[TD]aly1[/TD]
[/TR]
[TR]
[TD]balias1[/TD]
[TD]cb003836[/TD]
[TD][/TD]
[TD]jytjtyb[/TD]
[TD]balias1[/TD]
[TD][/TD]
[TD][/TD]
[TD]amerau1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]ashburn1
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]avery1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]balias1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]yukuy
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]verevv
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
For the new_ID column, usually I'd do a Vlookup to match the Old_ID to the Current_ID to produce new_ID. For example:
=VLOOKUP(H2,$A$1:$B$8,2,FALSE)
but I already know that some of the current_Id need to be converted from Badid into Old_ID first and then converted to new_ID.
Is there a way that I can do this with Nested If statements and Vlookup?
[TABLE="class: grid, width: 512"]
<colgroup><col span="8"></colgroup><tbody>[TR]
[TD]old_ID
[/TD]
[TD]new_ID
[/TD]
[TD][/TD]
[TD]badid[/TD]
[TD]old_ID[/TD]
[TD][/TD]
[TD]new_ID[/TD]
[TD]current_ID
[/TD]
[/TR]
[TR]
[TD]adams1
[/TD]
[TD="colspan: 2"]ma000262
[/TD]
[TD]gerger[/TD]
[TD]adams1[/TD]
[TD][/TD]
[TD][/TD]
[TD]gerger[/TD]
[/TR]
[TR]
[TD]akin1[/TD]
[TD]za000804[/TD]
[TD][/TD]
[TD]ynytn[/TD]
[TD]akin1[/TD]
[TD][/TD]
[TD][/TD]
[TD]ynytn[/TD]
[/TR]
[TR]
[TD]aly1[/TD]
[TD]ca001425[/TD]
[TD][/TD]
[TD]wdwwef
[/TD]
[TD]aly1[/TD]
[TD][/TD]
[TD][/TD]
[TD]wdwwef[/TD]
[/TR]
[TR]
[TD]amerau1[/TD]
[TD]ca001480[/TD]
[TD][/TD]
[TD]tryjyj[/TD]
[TD]amerau1[/TD]
[TD][/TD]
[TD][/TD]
[TD]adams1[/TD]
[/TR]
[TR]
[TD]ashburn1
[/TD]
[TD]ba002831
[/TD]
[TD][/TD]
[TD]yukuy[/TD]
[TD]ashburn1[/TD]
[TD][/TD]
[TD][/TD]
[TD]akin1[/TD]
[/TR]
[TR]
[TD]avery1
[/TD]
[TD]ha111680[/TD]
[TD][/TD]
[TD]verevv[/TD]
[TD]avery1[/TD]
[TD][/TD]
[TD][/TD]
[TD]aly1[/TD]
[/TR]
[TR]
[TD]balias1[/TD]
[TD]cb003836[/TD]
[TD][/TD]
[TD]jytjtyb[/TD]
[TD]balias1[/TD]
[TD][/TD]
[TD][/TD]
[TD]amerau1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]ashburn1
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]avery1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]balias1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]yukuy
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]verevv
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
For the new_ID column, usually I'd do a Vlookup to match the Old_ID to the Current_ID to produce new_ID. For example:
=VLOOKUP(H2,$A$1:$B$8,2,FALSE)
but I already know that some of the current_Id need to be converted from Badid into Old_ID first and then converted to new_ID.
Is there a way that I can do this with Nested If statements and Vlookup?