On this page ⌄
VLOOKUP is one of the most used functions in Excel, and one of the most asked about in job tests. The "V" stands for vertical: it searches down the first column of a table, finds the row you want, and returns a value from another column in that row.
We'll use this staff table in A1:E9. Notice the column numbers in the header row. VLOOKUP counts columns from the left edge of the table, starting at 1.
| A (1): ID | B (2): Name | C (3): Department | D (4): Salary | E (5): Start date | |
|---|---|---|---|---|---|
| 2 | E101 | Hannah Lee | Sales | $52,000 | Mar 15, 2021 |
| 3 | E102 | Omar Haddad | Finance | $61,000 | Jul 1, 2019 |
| 4 | E103 | Grace Kim | Marketing | $48,500 | Jan 9, 2023 |
| 5 | E104 | Diego Ruiz | Sales | $57,500 | Nov 23, 2020 |
| 6 | E105 | Priya Shah | IT | $72,000 | May 14, 2018 |
| 7 | E106 | Tom Becker | Finance | $66,000 | Sep 5, 2022 |
| 8 | E107 | Lena Fischer | IT | $69,500 | Feb 19, 2024 |
| 9 | E108 | Sam Okafor | Marketing | $51,000 | Aug 30, 2021 |
The four VLOOKUP arguments
| Argument | What it means | Example |
|---|---|---|
| lookup_value | The value to find in the first column of the table | "E107" |
| table_array | The whole table, starting with the column you search | A2:E9 |
| col_index_num | Which column to return, counting from the left of the table | 2 |
| range_lookup | FALSE for an exact match. TRUE (or leaving it out) for an approximate match | FALSE |
Your first VLOOKUP
Who is employee E107? Search the IDs in the first column of A2:E9, and return the 2nd column, Name:
=VLOOKUP("E107", A2:E9, 2, FALSE)→ Lena FischerTo get that person's salary instead, change only the column number. Salary is the 4th column of the table:
=VLOOKUP("E102", A2:E9, 4, FALSE)→ $61,000That's really all there is to it: find this, in this table, return column number N, exact match.
Your turn. This one runs in a real spreadsheet, so you can click cells and drag ranges into the formula.
Try it yourself
A live spreadsheet. Type a formula and press Enter to check it.
Which department is employee E106 in? Use VLOOKUP.
Write your formula in the green cell, J2.
Click a cell to add it to your formula, drag to select a range, or click a column letter for the whole column.
Always use FALSE (unless you mean it)
This is the mistake that catches almost everyone. If you leave out the last argument, VLOOKUP doesn't do an exact match. It does an approximate match, which assumes the first column is sorted from smallest to largest and returns the closest value that's not bigger than the one you asked for.
On unsorted data like an ID list or a list of names, that gives you wrong answers without any error to warn you. So unless you specifically want an approximate match, end every VLOOKUP with FALSE (or 0, which means the same thing).
When TRUE is the right choice
Approximate match is exactly what you want for bands and tiers, like commission rates. Say this table is in A2:B5 and sorted from smallest to largest:
| A: Sales from | B: Commission | |
|---|---|---|
| 2 | $0 | 2% |
| 3 | $10,000 | 4% |
| 4 | $25,000 | 6% |
| 5 | $50,000 | 8% |
=VLOOKUP(31500, A2:B5, 2, TRUE)→ 6%$31,500 isn't in the table, so VLOOKUP drops back to the largest value that's not bigger, $25,000, and returns its rate. This only works if the first column is sorted in ascending order.
Copying VLOOKUP down a column
When you copy a VLOOKUP down to look up a whole list of IDs, the table reference moves with it unless you lock it. Add dollar signs to keep it fixed (press F4 after selecting the range to add them quickly):
=VLOOKUP(G2, $A$2:$E$9, 3, FALSE)Now G2 changes to G3, G4 and so on as you copy, but the table stays A2:E9.
How to fix #N/A in VLOOKUP
#N/A means VLOOKUP couldn't find the value. Work through this list:
- Is the value really there? Check the spelling, including extra spaces at the end. TRIM removes them.
- Is it in the first column of table_array? VLOOKUP only searches the leftmost column of the range you give it.
- Numbers vs text.
1001typed as a number won't match"1001"stored as text. Look for the small green triangle in the cell. - Did the table move when you copied? Lock it with
$A$2:$E$9. - Is the value genuinely missing? Then show a message instead of the error:
=IFNA(VLOOKUP(G2, $A$2:$E$9, 3, FALSE), "Not found")Two other errors you might meet: #REF! means col_index_num is bigger than the number of columns in the table, and #VALUE! means it's less than 1.
What VLOOKUP can't do
- It can't look left. The column you search must be the first column of the table. To find an ID from a name, you'd have to move columns around.
- Inserting a column breaks it. The column number is fixed, so
3points at the wrong column after you insert one inside the table. - It only returns the first match. If a value appears twice, you get the top one.
INDEX with MATCH, and XLOOKUP, solve all three. If your Excel has XLOOKUP, it's the easier choice for new work. Read our XLOOKUP guide to see the difference.
VLOOKUP vs HLOOKUP
HLOOKUP is the same idea turned sideways. It searches across the first row of a table and returns a value from a row number you choose. It's rarely needed, since most data is arranged in columns.
Key takeaways
- VLOOKUP searches the first column of a table and returns column number N from the same row.
- End it with
FALSEfor an exact match. Leaving it out gives an approximate match. - Lock the table with dollar signs before copying the formula down.
- For new workbooks in Excel 365 or 2021 and later, XLOOKUP is simpler and safer.
Practice
Keep going with VLOOKUP exercises
Reading gets you started. Solving a few of these is what makes it stick.
- 1VLOOKUP by IDFreeWhich department is employee E106 in? Use VLOOKUP.→
- 2Find a salaryFreeWhat is Priya Shah's salary?→
- 3INDEX and MATCH PremiumFind the name of employee E103 using INDEX and MATCH.→

About the author
Brian Millot
Brian Millot is an indie hacker based in France who builds small, focused web products. He built and runs Excel Formula Practice, from the in-browser spreadsheet that checks your formulas to the exercise library, and he writes the formula guides.