VLOOKUP in Excel is one of the most useful functions you can learn. It finds a value in one table and brings back related information, such as a product price from a product code, an employee’s department from their ID, or a customer’s phone number from their name. If you have ever copied data from one list to another by hand, VLOOKUP will save you hours.
In this tutorial you will learn the VLOOKUP syntax, see real examples, understand exact versus approximate match, fix the most common errors and learn when a newer function is a better choice.
Table of Contents
- What Does VLOOKUP in Excel Do?
- VLOOKUP Syntax Explained
- Example 1: Find a Product Price
- Example 2: Fill an Entire Order List
- Example 3: VLOOKUP From Another Workbook
- Exact Match vs Approximate Match
- How to Fix Common VLOOKUP Errors
- VLOOKUP Tips the Pros Use
- The Biggest Limitations of VLOOKUP
- Real-World Uses of VLOOKUP in Excel
- Practice Exercise
- Frequently Asked Questions
- Conclusion
What Does VLOOKUP in Excel Do?
VLOOKUP stands for Vertical Lookup. It searches down the first column of a table for a value you specify. When it finds a match, it moves across that row and returns the value from the column you choose.
Think of it like looking up a name in a phone book: you find the name in the first column, then read across to the phone number.
VLOOKUP Syntax Explained
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
| Argument | Meaning |
|---|---|
lookup_value |
What you are looking for (for example a product code in cell A2) |
table_array |
The table to search. The lookup column must be the first column of this range |
col_index_num |
Which column of the table to return, counting from 1 |
range_lookup |
FALSE (or 0) for an exact match, TRUE (or 1) for an approximate match |
Golden rule: for most work you want an exact match, so always type FALSE as the last argument.
Example 1: Find a Product Price
Imagine a product list in A1:C6:
| Code | Product | Price |
|---|---|---|
| P101 | Keyboard | 1200 |
| P102 | Mouse | 650 |
| P103 | Monitor | 14500 |
| P104 | Headset | 2200 |
| P105 | Webcam | 3100 |
You type a code in E2 and want its price in F2:
=VLOOKUP(E2, $A$2:$C$6, 3, FALSE)
E2is the code you are searching for.$A$2:$C$6is the product table (locked with dollar signs so it does not move when copied).3returns the third column, Price.FALSErequires an exact match.
Type P103 in E2 and the formula returns 14500.
Example 2: Fill an Entire Order List
Most of the time you use VLOOKUP to fill a whole column. Suppose your orders sheet has product codes in column A and you want product names in column B.
- In
B2, enter=VLOOKUP(A2, Products!$A$2:$C$500, 2, FALSE). - Press Enter.
- Double-click the fill handle to copy the formula down to every row.
Notice the reference Products!$A$2:$C$500. This tells Excel the table is on another worksheet called Products. You can build this reference simply by clicking the other sheet while writing the formula.
Example 3: VLOOKUP From Another Workbook
You can look up data in a separate file. Open both workbooks, start your formula, then switch to the other workbook and select the range. Excel writes something like:
=VLOOKUP(A2, '[Price List.xlsx]Sheet1'!$A$2:$C$500, 3, FALSE)
If the source workbook is closed, Excel keeps the last values and includes the full file path. Be careful when moving or renaming that file, because the link will break.
Learn every Excel lookup the right way
VLOOKUP is just the start. Learn INDEX MATCH, XLOOKUP, dynamic arrays and VBA with real business workbooks in a step-by-step course.
Exact Match vs Approximate Match
Exact match (FALSE)
Use this for codes, IDs, names and emails. If Excel cannot find the exact value, it returns #N/A.
Approximate match (TRUE)
Use this for ranges such as tax brackets, commission tiers or grade bands. The first column must be sorted in ascending order. Excel finds the largest value that is less than or equal to your lookup value.
Example grade table:
| Min score | Grade |
|---|---|
| 0 | F |
| 40 | D |
| 50 | C |
| 60 | B |
| 80 | A |
=VLOOKUP(73, $A$2:$B$6, 2, TRUE)
This returns B, because 60 is the largest minimum that is not above 73.
How to Fix Common VLOOKUP Errors
#N/A error
The value was not found. Common causes:
- Extra spaces. “P101 ” is not the same as “P101”. Clean with
=TRIM(A2). - Numbers stored as text. A code like 1001 may be a number in one list and text in the other. Convert with
=VALUE(A2)or=TEXT(A2,"0")so both match. - The value truly does not exist. Wrap the formula to show a friendly message:
=IFERROR(VLOOKUP(A2, $A$2:$C$500, 3, FALSE), "Not found")
#REF! error
Your col_index_num is larger than the number of columns in the table. If the table is A:C (3 columns), you cannot ask for column 4.
Wrong results
Usually you forgot FALSE at the end, so Excel used an approximate match on an unsorted list. Always check the last argument.
Results break after copying
You forgot to lock the table with $ signs, so the range shifted as you copied. Use $A$2:$C$500 or, even better, an Excel Table.
For a full guide to every error message, read Excel #N/A, #VALUE! and #REF! errors explained.
VLOOKUP Tips the Pros Use
- Use Excel Tables. Convert your lookup range with
Ctrl + Tand name it, for exampletblProducts. Your formula becomes=VLOOKUP(A2, tblProducts, 3, FALSE)and grows automatically when you add products. - Make the column number dynamic. Use MATCH to find the column by its header so inserting columns never breaks your formula:
=VLOOKUP(A2, tblProducts, MATCH("Price", tblProducts[#Headers], 0), FALSE) - Use wildcards for partial matches.
=VLOOKUP("*"&A2&"*", B2:D100, 2, FALSE)finds a value that contains your text. - Two-condition lookups. Create a helper column that joins two fields, such as
=A2&"-"&B2, and look up that combined key.
The Biggest Limitations of VLOOKUP
VLOOKUP is popular, but it has weaknesses:
- It cannot look left. The lookup column must be the first column of the table.
- It breaks when columns are inserted if you hard-code the column number.
- It only returns the first match.
- It is slower on very large datasets when used with whole-column references.
That is why many professionals now use INDEX MATCH or XLOOKUP. Read how to use INDEX MATCH in Excel and our comparison of XLOOKUP vs VLOOKUP to decide which is right for you.
Stop fighting with formulas
Get hands-on practice with lookups, logical functions, dynamic arrays and macros so you can build reports with confidence.
Real-World Uses of VLOOKUP in Excel
Once you understand the pattern, you will see VLOOKUP opportunities everywhere at work. Here are some of the most common:
- Sales and invoicing: pull product names, unit prices and VAT rates into an invoice from a master price list, so staff only type the product code.
- HR and payroll: bring an employee’s department, grade and basic salary into a payroll sheet using their staff ID.
- Inventory: match supplier codes to reorder levels and current stock to decide what to purchase.
- Reconciliation: compare a bank statement with your accounts ledger. Look up each transaction reference; any
#N/Aresult is an item that exists in one list but not the other. - Student results: convert scores into grades with an approximate-match VLOOKUP on a grade table.
- Customer service: look up a customer’s plan, region and account manager from their customer number.
Using VLOOKUP to compare two lists
A very popular trick is checking which items in List A are missing from List B. Next to List A, enter:
=IF(ISNA(VLOOKUP(A2, ListB!$A$2:$A$5000, 1, FALSE)), "Missing", "Found")
Copy it down, then filter the column for “Missing”. In a few seconds you have a list of every unmatched record, a job that could take hours by eye.
VLOOKUP with dates and numbers
VLOOKUP works with dates because Excel stores dates as numbers. Make sure both lists contain real dates, not text that looks like a date. If one side was imported from another system, use Data > Text to Columns or the DATEVALUE function to convert it first. The same applies to numbers imported from accounting software, which often arrive as text.
Practice Exercise
Build a small workbook to lock in what you learned:
- Sheet Employees: ID, Name, Department, Salary for 10 people.
- Sheet Requests: a list of 5 IDs.
- Use VLOOKUP to return each person’s name and department.
- Add one ID that does not exist and handle it with IFERROR.
- Build a bonus table with salary bands and use an approximate-match VLOOKUP to calculate each bonus percentage.
Frequently Asked Questions
Why does my VLOOKUP return #N/A when the value is clearly there?
Usually because of extra spaces or a mismatch between numbers and text. Use TRIM to remove spaces and make sure both lists store the value the same way, either as numbers or as text.
Can VLOOKUP look to the left?
No. VLOOKUP only returns values to the right of the lookup column. Use INDEX MATCH or XLOOKUP if you need to return a value from a column on the left.
Should I use TRUE or FALSE in VLOOKUP?
Use FALSE for exact matches such as IDs, codes and names. Use TRUE only for range lookups like tax brackets or grades, and make sure the first column is sorted in ascending order.
Is VLOOKUP still worth learning?
Yes. Millions of existing workbooks use VLOOKUP, and interviewers still test it. Learn it first, then learn XLOOKUP, which is easier and more flexible in newer versions of Excel.
Does VLOOKUP work in Google Sheets?
Yes. VLOOKUP works the same way in Google Sheets, with the same four arguments.
Conclusion
VLOOKUP lets you connect tables and pull information automatically instead of copying by hand. Remember the four arguments, always use FALSE for exact matches, lock your ranges and clean your data before looking it up. Once you are comfortable, move on to INDEX MATCH and XLOOKUP to handle any lookup problem.
Become the Excel expert in your office
Master formulas, functions, lookups, VBA and macros with practical lessons and lifetime access.
Good to know: BUY INDIVIDUAL COURSE directly through this link gives you lifetime access, and it supports the instructor far more than watching it through a Udemy subscription plan.