Excel beginner trying to use a formula that automatically fills a given cell, given a certain input.

Struck

New Member
Joined
Aug 9, 2015
Messages
2
Hello,

I'm currently building a very large database, in which two of the columns contain the same information, but in different forms. One column gives the name of given country in the set (eg Afghanistan) and the other column gives the abbreviation of that name (eg AFG).
I am trying to set up a formula so that every time I enter a country's name, it will automatically fill the abbreviation in, which would save a lot of time. I can do this for single countries, but I haven't been able to write a compound formula that allows for "IF (name of any country) THEN (that country's abbreviation code)".
Does anyone know how to write a formula that will allow me to do this? Take into account that this formula would be huge, as there are around 200 widely recognised states. If this won't work, are there any other options I could pursue?

Thanks!
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
hi, might this be the kind of thing you're looking for? (see link below)
https://www.dropbox.com/s/2z6borfxelj3hyk/Mr%20Excel%20Struck%20Example.xlsx?dl=0
Thinking you might want to use function VLOOKUP? Entered country abbreviations once in worksheet entitled "abbrev". Then in worksheet entitled "sheet2", enter country name in col A, and vlookup function in column b grabs the abbreviation for you from the "abbrev" worksheet. Not sure this is what you're looking for though.
Thx!
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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