Pepelen
← Excel from Scratch: Formulas, Functions, and Data Analysis

Lesson

VLOOKUP: looking up values in a table

Pull data from a lookup table by key with VLOOKUP and an exact match.

1 / 6

How VLOOKUP works

VLOOKUP: finding a value in a table

VLOOKUP is one of Excel's most popular functions. It finds a value in a lookup table and returns data from the column you need in that table. A typical example: you have a list of product SKUs, and a separate lookup table with prices. VLOOKUP finds the SKU in the lookup table and pulls in the price. Syntax: =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]). The first argument is the value you're looking for (for example, a SKU). The second is the range of the lookup table. The third is the number of the column in that range to return the result from (for example, 2 if the price is in the second column). The fourth argument is the match mode: 0 or FALSE means an exact match, and that's almost always what you need. Remember two limitations: VLOOKUP always searches the first column of the given table and returns data only from columns to its right. The lookup value must be in the leftmost column of the range. Common mistakes: leaving out the fourth argument (Excel then looks for an approximate match and may return a wrong result), and forgetting to lock the table with $ when copying the formula — then the lookup table range shifts down and the formula breaks. Correct: =VLOOKUP(A2, $E$2:$F$10, 2, 0).
Lesson notes
VLOOKUP: finding a value in a table
VLOOKUP is one of Excel's most popular functions. It finds a value in a lookup table and returns data from the column you need in that table. A typical example: you have a list of product SKUs, and a separate lookup table with prices. VLOOKUP finds the SKU in the lookup table and pulls in the price. Syntax: =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]). The first argument is the value you're looking for (for example, a SKU). The second is the range of the lookup table. The third is the number of the column in that range to return the result from (for example, 2 if the price is in the second column). The fourth argument is the match mode: 0 or FALSE means an exact match, and that's almost always what you need. Remember two limitations: VLOOKUP always searches the first column of the given table and returns data only from columns to its right. The lookup value must be in the leftmost column of the range. Common mistakes: leaving out the fourth argument (Excel then looks for an approximate match and may return a wrong result), and forgetting to lock the table with $ when copying the formula — then the lookup table range shifts down and the formula breaks. Correct: =VLOOKUP(A2, $E$2:$F$10, 2, 0).
VLOOKUP: looking up values in a table — Excel from Scratch: Formulas, Functions, and Data Analysis