Tip Printed from ExcelTip.com
Encoding a Sequence of Letters


Problem:

Column A contains a series of letters, column B contains matching codes for each letter.
We want to create new strings composed of the codes matching each of the letter strings shown in column D.

Solution:

Use the VLOOKUP and MID functions as shown in the following formula:
=VLOOKUP(MID(D2,1,1),$A$2:$B$7,2,FALSE)&" "&VLOOKUP(MID(D2,2,1),$A$2:$B$7,2,FALSE)&" "&VLOOKUP(MID(D2,3,1),$A$2:$B$7,2,FALSE)