Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

3 LETTER CODE FROM THE LIST

0

i want to update 3 letter code into full name from the list

suppose in a cell its MAD then the cell besides MAD shoudl be Madrid.

i will only get the 3 letter codes and i also have the list saved of the full forms of these codes in the excel, how do i automate it.

Answer
Discuss

Answers

0
Selected Answer

If Madrid should become MAD, then use a formula like this pointing to the cell with Madrid:

=UPPER(LEFT(A1,3))

If you want to search for Madrid using the code MAD then you need to use Vlookup. Maybe something like this:

=VLOOKUP(A1,F1:G5,2,FALSE)

A1 is the cell with the code in it.

F1:G5 should be the table that lists the codes along with the full names. MAKE SURE the codes are in the left most column of this range, in this case, in column F.

2 means that the full names will be in the second column of the table in the range F1:G5, which in this case means they will be in column G.

FALSE means to only return a result if an exact match is found.

Discuss

Discussion

Thank you very much!!

That was some awesome stuff
abrahamsavel (rep: 2) Aug 17, '17 at 8:14 am
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login