⇄Lookups4 min read ·

How to Use VLOOKUP in Excel, Step by Step

VLOOKUP explained in plain English. How the four arguments work, why you should almost always use FALSE, how to fix #N/A, and when to switch to XLOOKUP.

Quick answer

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

VLOOKUP looks for a value in the first column of a table and returns a value from a column you choose in the same row. Use FALSE as the last argument to get an exact match.

Arguments in [brackets] are optional.

On this page ⌄
  1. The four VLOOKUP arguments
  2. Your first VLOOKUP
  3. Always use FALSE (unless you mean it)
  4. When TRUE is the right choice
  5. Copying VLOOKUP down a column
  6. How to fix #N/A in VLOOKUP
  7. What VLOOKUP can't do
  8. VLOOKUP vs HLOOKUP
  9. Key takeaways

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): IDB (2): NameC (3): DepartmentD (4): SalaryE (5): Start date
2E101Hannah LeeSales$52,000Mar 15, 2021
3E102Omar HaddadFinance$61,000Jul 1, 2019
4E103Grace KimMarketing$48,500Jan 9, 2023
5E104Diego RuizSales$57,500Nov 23, 2020
6E105Priya ShahIT$72,000May 14, 2018
7E106Tom BeckerFinance$66,000Sep 5, 2022
8E107Lena FischerIT$69,500Feb 19, 2024
9E108Sam OkaforMarketing$51,000Aug 30, 2021

The four VLOOKUP arguments

ArgumentWhat it meansExample
lookup_valueThe value to find in the first column of the table"E107"
table_arrayThe whole table, starting with the column you searchA2:E9
col_index_numWhich column to return, counting from the left of the table2
range_lookupFALSE for an exact match. TRUE (or leaving it out) for an approximate matchFALSE

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 Fischer

To 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,000

That'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.

Exercise 2 of 11VLOOKUP

Which department is employee E106 in? Use VLOOKUP.

Write your formula in the green cell, J2.

staff-list.xlsx
fx
1IDNameDepartmentSalaryStart dateDepartmentBonus
2E101Hannah LeeSales$52,000.00Mar 15, 2021Sales10%Department
3E102Omar HaddadFinance$61,000.00Jul 1, 2019Finance6%
4E103Grace KimMarketing$48,500.00Jan 9, 2023Marketing8%
5E104Diego RuizSales$57,500.00Nov 23, 2020IT7%
6E105Priya ShahIT$72,000.00May 14, 2018
7E106Tom BeckerFinance$66,000.00Sep 5, 2022
8E107Lena FischerIT$69,500.00Feb 19, 2024
9E108Sam OkaforMarketing$51,000.00Aug 30, 2021
10
11

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 fromB: Commission
2$02%
3$10,0004%
4$25,0006%
5$50,0008%
=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:

  1. Is the value really there? Check the spelling, including extra spaces at the end. TRIM removes them.
  2. Is it in the first column of table_array? VLOOKUP only searches the leftmost column of the range you give it.
  3. Numbers vs text. 1001 typed as a number won't match "1001" stored as text. Look for the small green triangle in the cell.
  4. Did the table move when you copied? Lock it with $A$2:$E$9.
  5. 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 3 points 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 FALSE for 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.

  1. 1VLOOKUP by IDFreeWhich department is employee E106 in? Use VLOOKUP.→
  2. 2Find a salaryFreeWhat is Priya Shah's salary?→
  3. 3INDEX and MATCH PremiumFind the name of employee E103 using INDEX and MATCH.→
All lookups exercises →
Brian Millot

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.

Related guides

Practice makes formulas

Stop reading. Start typing formulas.

Every exercise is a real spreadsheet with instant feedback. The first two in every topic are free, no sign-up needed.