Enter country code when country name is found

sven_01

New Member
Joined
Mar 4, 2018
Messages
3
Hi,
I want to have a formula that looks through a range of cells, and if a country is listed ( i.e United States) in a cell, then it will enter the 2 letter code in another cell (i.e US).
This would apply for approximately 70 countries.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Thanks, but how do i deal with the instances where a country appears multiple times in the list. I did a vlook up formula but it did not work for multiple entries .Can anyone provide me the actual formula if the full list of countries runs from A1 through to A90 ( multiple occurrence of same country), where the table listing all countries is in E1 through to E70, and the matching country codes are in F1 through to F70 (country in E1 has matching 2 letter code in F1 and so on.)
thanks in advance.
 
Upvote 0
Thanks again Alansidman.
Sorry, but my excel experience is limited, and looking at this link didn't help me at all. (probably says a lot for my excel ability) Was hoping for the actual formula I could insert given the parameters in my 2nd post and the cells I provided.... can you / anyone else assist?
 
Upvote 0

Forum statistics

Threads
1,214,942
Messages
6,122,367
Members
449,080
Latest member
Armadillos

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