Practice file to follow along
The fastest way to learn VLOOKUP is to type it yourself. The practice file has four tasks. Next to each row there is a check cell that says "correct" or "not yet" as soon as you have entered a formula. No email address needed.
- VLOOKUP practice file with basics, two sheets, find the error and discount tiers
- Answers with every formula filled in, plus each formula written out the way you type it
All products and prices in the file are invented example data.
What does VLOOKUP do?
The V stands for vertical. The function goes down a list from top to bottom until it finds your lookup value in the first column. It then stays in that row and returns the value from the column you name.
Typical tasks at work include
- getting the price for a product number from the price list
- adding the department or name for an employee ID
- finding the contact person for a customer number
- reading the right discount from a tier table
Syntax and how to write it
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
These are the argument names Excel shows you while you type. English Excel separates arguments with commas. German and French Excel use semicolons, so guides written for those versions need commas when you copy them.
| Excel language | The same formula |
|---|---|
| English | =VLOOKUP(A5,$G$5:$I$12,3,FALSE) |
| German | =SVERWEIS(A5;$G$5:$I$12;3;FALSCH) |
| French | =RECHERCHEV(A5;$G$5:$I$12;3;FAUX) |
If you open the file in Excel set to another language, Excel shows the formula in that language on its own. You find every name in three languages in our Excel formulas cheat sheet.
The four arguments
| Argument | Required? | What you enter | Example |
|---|---|---|---|
| lookup_value | yes | the value you are looking for, usually a cell | A5 (product number 1003) |
| table_array | yes | the whole list, with the lookup column first | $G$5:$I$12 (price list) |
| col_index_num | yes | the number of the column with the result, counted from the first column of your table | 3 (price) |
| range_lookup | no | FALSE for exact matches, TRUE for approximate ones | FALSE |
The column number always counts from the first column of the table, not from column A of the sheet. If your table starts in column G, then G is column 1, H is 2 and I is 3.
Step by step to get a price for a product number
This is how you solve task 1 of the practice file. The orders are on the left, and the price list with product number, item and price is on the right in G4:I12.
- Click cell C5, where the price should go.
- Type
=VLOOKUP(and click A5. That is the lookup value. - Type a comma and select the price list G5:I12. Press F4 (Windows) or type the dollar signs yourself to turn it into
$G$5:$I$12. This keeps the table in place when you fill the formula down. - Type
,3,FALSE)and press Enter. C5 now shows $1.29, the price of the yellow highlighter. - Drag the small square at the bottom right of the cell down to C9. The check cells in column E say "correct".
Exact or approximate with FALSE and TRUE
The last argument decides how Excel searches. If you leave it out, Excel looks for an approximate match. That is the most common reason for wrong results without any error message.
| range_lookup | Excel looks for | Use it for |
|---|---|---|
| FALSE (or 0) | the exact value only, otherwise #N/A | product numbers, names, customer IDs, almost everything at work |
| TRUE (or 1, or left out) | the largest value that is less than or equal to the lookup value | tiers such as discounts, commissions, grade scales |
With TRUE, the first column of the table has to be sorted in ascending order. Otherwise Excel returns a wrong result and gives you no warning.
Discount tier example (task 4). The tiers are in E5:F8, with limits of $0, $100, $500 and $1,000 and discounts of 0%, 2%, 5% and 8%. There is no exact row for an order value of $720. With =VLOOKUP(A7,$E$5:$F$8,2,TRUE) Excel takes the $500 row and returns 5%.
Remember the rule. Numbers and text always get FALSE, and TRUE is only for tiers with a sorted first column.
VLOOKUP across two tables or sheets
If the price list is on another sheet, only the table argument changes. While you type the table, click the other sheet and select the list there. Excel adds the sheet name in front.
=VLOOKUP(A5,'Price list'!$A$5:$C$12,3,FALSE)
If the sheet name contains spaces, Excel puts it in single quotes as shown above. You practice this in task 2.
Two lookup criteria. VLOOKUP can only handle one lookup value. If you need two, such as product number and color, add a helper column on the far left of the list that joins both, for example =A5&"-"&B5. Then look up the same combination. XLOOKUP can do this without a helper column.
VLOOKUP not working and how to fix #N/A and other errors
| What you see | Cause | Fix |
|---|---|---|
| #N/A | The value really is not in the list. | Show your own text with IFERROR, =IFERROR(VLOOKUP(A5,$G$5:$I$12,3,FALSE),"not in list") |
| #N/A although the number is in the list | One of the two numbers is stored as text and the other as a number. Text usually sits on the left of the cell, often with a green triangle in the corner. | Turn the text into a number, for example with the warning icon next to the cell. You practice this in task 3. |
| #N/A because of spaces | The lookup value or the list has a trailing space, often after an import. | Clean it with TRIM, =VLOOKUP(TRIM(A5),$G$5:$I$12,3,FALSE) |
| #N/A with TRUE | The lookup value is smaller than the smallest value in the first column. | Start the tier table at 0. |
| Wrong result, no error | The last argument is missing, so Excel looks for an approximate match in an unsorted list. | Add FALSE. |
| #REF! | The column number is larger than the number of columns in the table. | Count the columns again, starting from the first column of the table. |
| #VALUE! | The column number is less than 1. | Enter a column number of 1 or more. |
| #NAME? | The function name is misspelled or in another language, such as SVERWEIS in English Excel. | Type VLOOKUP and use commas. |
| Results are wrong after filling down | The table moves along as you drag the formula. | Lock the table with $, as in $G$5:$I$12 |
If your data comes from a CSV file, numbers are often stored as text. Our guide on how to open a CSV file in Excel shows how to stop that during the import. All error values are explained in the guide to Excel errors.
VLOOKUP cannot look to the left
VLOOKUP only searches the first column of the table and returns values from columns to the right of it. If the product number sits to the right of the price, it finds nothing. You have three ways out.
- Start the table at the lookup column, or rearrange the columns of the list.
- Use XLOOKUP, which searches in both directions.
- Combine INDEX and MATCH, which also works in older Excel versions.
One more trap. If you insert a column inside the table, the column number stays the same and the formula then points to the wrong column. Check your column numbers after every new column.
Which Excel versions have VLOOKUP?
VLOOKUP is available in every Excel version, including Excel for the web and Excel for Mac. IFERROR and TRIM are also available in all current versions.
VLOOKUP or XLOOKUP?
XLOOKUP is the newer successor. It looks for exact matches by default, also finds values to the left of the lookup column and has its own argument for a "not found" text. According to Microsoft it is available in Microsoft 365, Excel 2024, Excel 2021 and Excel for the web, and not in Excel 2019 or Excel 2016.
As a rule of thumb, you can use XLOOKUP for your own new files. If colleagues or clients still work with Excel 2019 or older, stay with VLOOKUP. Existing VLOOKUP formulas that work do not need to be rebuilt. The full comparison in eight points is in our XLOOKUP guide.
Related functions
- XLOOKUP searches in both directions, in Excel 2021 and later
- INDEX and MATCH together look to the left
- IFERROR shows your own text instead of #N/A
- TRIM removes extra spaces
You find all functions with their English, German and French names in the Excel formulas cheat sheet.
What to learn next
Once the practice file works, try VLOOKUP on a list of your own. You can practice formulas like this in our Excel exercises with instant feedback. The Excel test shows you where you stand.
Sources
Function and argument names, default behavior and error values from Microsoft's help pages, November 2026.
- Microsoft, VLOOKUP function
- Microsoft, XLOOKUP function
- Microsoft, IFERROR function
- Microsoft, TRIM function