Go Back

How to Use VLOOKUP to Map Text to Numbers

Translating text inputs into arbitrary numeric values might look easy if we are dealing with a small set of values, but what if the list of values is so big? Learning how to map text to numbers in excel is a great step towards making your work easy and simple. This article provides a clear guide on how you can use the VLOOKUP function to map text to numbers in excel.

Figure 1: How to map text to numbers

General syntax of the formula

=VLOOKUP(text,lookup_table,2,0)

Understanding the formula

The use of the VLOOKUP function is the only sure way we can get the arbitrary numeric values from text strings. In the above table, we are trying to get the arbitrary numeric values of the books, which have been assigned unique codes.

How the formula works

  • The formula utilizes the VLOOKUP function to translate text to numbers.
  • In our case above, the formula is using the value in cell E4 as the lookup value, A2:B6 as the range for the lookup table, 2 to indicate the 2nd column and zero to force exact match.
  • After we have entered the formula in cell E4, we press enter to get the numeric value, which is the code for History.
  • Note that this formula can also be used to map text to text as well as numbers to text.

Example

Figure 2: Example of how to map text to numbers in excel

In this example, we have names of individuals and their unique codes. We want to map the names to their respective codes. To do this, we proceed as follows:

Step 1: Fill the table with the data I.e. name and code

Step 2: Indicate where you want the result to be displayed

Step 3: Put the formula in the cell where you want to have the result, =VLOOKUP(G6,C5:D9,2,0)

Step 4: Press Enter to get the arbitrary numeric value of the text.

Instant Connection to an Expert through our Excelchat Service

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Did this post not answer your question? Get a solution from connecting with the expert.

Another blog reader asked this question today on Excelchat:
Here are some problems that our users have asked and received explanations on

I have a problem regarding to Map text to numbers
Solved by I. J. in 21 mins
Need to convert abbreviated states into full-text and also create a geographical map with conversions scores of different accounts by state.
Solved by T. A. in 21 mins
Map functions
Solved by E. H. in 17 mins

Leave a Comment

avatar