Explanation
This formula uses the value in cell F6 for a lookup value, the range B5:C10 for the lookup table, 2 to indicate "2nd column", and zero as the last argument to force an exact match.
Although in this case we are mapping numeric inputs to numeric outputs, the same formula will handle text values for both inputs and outputs.
Alternative with CHOOSE
If you have a limited number of inputs, and if the inputs are are numbers starting with 1, you can also use the CHOOSE function. For the example shown the equivalent formula based on CHOOSE is:
=CHOOSE(F6,10,81,17,23,13,31)
The choose function is unwieldy for large amounts of data but for smaller data sets that map to a 1-based index, it has the advantage of being an "all in one" solution.
Related formulas
VLOOKUP calculate grades
Get employee information with VLOOKUP
VLOOKUP two-way lookup
Merge tables with VLOOKUP
VLOOKUP without #N/A error
Sum text values like numbers
Map text to numbers
Related functions
VLOOKUP Function
VLOOKUP is an Excel function to look up data in a table organized vertically. VLOOKUP supports approximate and exact matching, and wildcards (* ?) for partial matches. Lookup values must appear in the first column of the table...
CHOOSE Function
The Excel CHOOSE function returns a value from a list using a given position or index. For example, =CHOOSE(2,"red","blue","green") returns "blue", since blue is the 2nd value listed after the index number. The values provided to CHOOSE can include references.