There is a few approaches but the most efficient/logical way to do this is to setup a table with all possible values you would enter along with what you want to appear when you do enter them.
In your sample you say 101 = Fourteen and 102 = Seventeen. Essentially that is the table I am talking about and you can extend it to fit your needs.
Now utilize a VLookup, which is to say Vertical Lookup. Here is the Format of the VLookup
=VLookup(Value,Range,IndexNumber,MatchCondition)
Where
Value is the value you wish to lookup (In your case the 101 or 102 found in column D
Range is the table range in which your references are housed again in your case is A2 through B3 but we write it as A2:B3. Be sure to make them absolute (LOCK the range down) by adding $ symbols like so $A$2:$B$3Locking a column you add it in front of the column letter $A2, Locking the row you put it in front of the Number A$2. To make it absolute and locked completely you put it in front of both $A$2
We lock it so that when you copy paste or drag the formula, the reference to that cell or block of cells does not change
Index Number or Column Number is the number of columns away from the first column in your range that you wish to get the data from. In your case 2 as it is from Col A(1) to Col B(2) always count the first column as 1
Then your match type, can it be a close match or EXACT match. You almost always will use FALSE which is to say I only want an exact match nothing similar
Final formula that you would enter into E2 would look like this
=VLOOKUP($D2,$A$2:$B$3,2,FALSE)
Hope that helps - let me know if you have questions after all that... If not, don't forget to mark as resolved in you feel it is solved
Bookmarks