Lookup Value and Replace Based on Table data

MHamid

Active Member
Joined
Jan 31, 2013
Messages
472
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hello,

I need a formula that will replace the countries in a field in Sheet1 by looking at Sheet2 and replacing the country with the corresponding Country Code.
Below is just a sample of the data.

Sheet1:
Country
UK
Singapore
US
All Costa Rica;Argentina;Bahamas;Brazil;Colombia;Costa Rica CSC;Mexico;Venezuela
Ireland;UK
Jersey;Luxembourg;Switzerland;UK
Canada;US
Algeria;All Costa Rica;Argentina;Australia;Brazil;Bulgaria;Cameroon;Canada;Colombia;Congo;Costa Rica;Czech;Dominican Republic;Ecuador;Egypt;Gabon;Guatemala;Honduras;Hong Kong;Hungary;India;Indonesia;Israel;Kazakhstan;Kenya;Mexico;Nigeria;Pakistan;Panama;Paraguay;Peru;Philippines;Puerto Rico;Qatar;Romania;Russia;Singapore;Slovakia;South Africa;Switzerland;Taiwan;Tanzania;Thailand;Trinidad & Tobago;Turkey;UAE;UK;Ukraine;Uruguay;US;Venezuela;Zambia
Japan

Sheet2:
CountryCountry Coded
AlgeriaAlgeria(DZ)
ArgentinaArgentina(AR)
ArubaAruba(AW)
Asia HubAsia Hub(X6)
AustraliaAustralia(AU)
AustriaAustria(AT)


Thank you,
Miriam
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

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