Start free
Lookup & reference

VLOOKUP function

VLOOKUP searches the first column of a table for a value and returns the value in the same row from a column you choose by number. Always end it with FALSE for an exact match.

Available in every version of Excel, Excel for the web and Google Sheets
On this page

VLOOKUP syntax

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
ArgumentRequiredWhat it means
lookup_valueYesWhat you're looking for. It must be in the first column of table_array.
table_arrayYesThe table, starting with the column you search in.
col_index_numYesWhich column of the table to return, counting the first as 1.
range_lookupNoFALSE for an exact match. Leave it out and VLOOKUP does an approximate match, which needs sorted data.

Examples

Find a price by product code

The table is A2:C6. The price is its 3rd column, and FALSE asks for an exact match on the code in E2.

F2=VLOOKUP(E2,A2:C6,3,FALSE)
RowABCDEF
1CodeProductPriceFindPrice
2A-101Keyboard$49.00A-104$59.00
3A-102Mouse$19.00
4A-103Monitor$189.00
5A-104Webcam$59.00
6A-105Headset$79.00
=VLOOKUP(E2,A2:C6,3,FALSE) → $59.00

Return a different column

Same table, column 2 instead of 3: the product name.

F2=VLOOKUP(E2,A2:C6,2,FALSE)
RowABCDEF
1CodeProductPriceFindProduct
2A-101Keyboard$49.00A-104Webcam
3A-102Mouse$19.00
4A-103Monitor$189.00
5A-104Webcam$59.00
6A-105Headset$79.00
=VLOOKUP(E2,A2:C6,2,FALSE) → Webcam

Practise it

New data, so you can't copy the answer above. We check the number your formula returns, then change the data to make sure it still holds.

Your task: In F2, return the stock level of the SKU in E2, or #N/A when that SKU isn't in the list.

Graded live
RowABCDEF
1SKUItemIn stockSKUIn stock
2SK-01Notebook340SK-04
3SK-02Pen1200
4SK-03Stapler45
5SK-04Folder610
6SK-05Marker0

Write the formula in the bar above, then press Check or Enter.

Hint

Search A2:C6 for E2 and return column 3. End with FALSE for an exact match.

Solution

=VLOOKUP(E2,A2:C6,3,FALSE) Any formula that returns the same result passes.

Common mistakes

  1. Leaving out FALSE. Without it VLOOKUP does an approximate match, which assumes the first column is sorted and can quietly return the wrong row. Write FALSE (or 0) as the fourth argument for codes, names and IDs.
  2. Looking up a value that isn't in the first column. VLOOKUP only searches the table's first column. Start table_array at the column you search in, or use XLOOKUP, which can look left.
  3. A column number past the end of the table. Asking for column 4 of the 3-column table A2:C6 returns #REF!.
  4. Hard-coded column numbers that go stale. Insert a column inside the table and column 3 is suddenly something else. XLOOKUP or INDEX/MATCH name the return column as a range instead.
  5. Numbers stored as text. 1041 and the text '1041' don't match, so you get #N/A. Convert one side, for example with VALUE or by re-entering the IDs as numbers.

FAQ

Why does VLOOKUP return #N/A?

The value isn't in the first column of the table, or it is but differs slightly: extra spaces, a number stored as text, or a typo. Check the first column, then wrap the formula in IFNA if a missing value is expected.

What does FALSE mean in VLOOKUP?

FALSE asks for an exact match. Without it, VLOOKUP does an approximate match that only works on sorted data and can return the wrong row.

Can VLOOKUP look to the left?

No. It returns columns to the right of the one it searches. Use XLOOKUP or INDEX and MATCH to look left.

Should I still learn VLOOKUP?

Yes. It's in almost every existing workbook and in many interview tests. For new formulas in Microsoft 365 or Excel 2021, XLOOKUP is easier and safer.

Guides that use VLOOKUP

Worked problems with practice sheets.

Interview prepPractice sheet

Excel lookup interview question: match two tables

The lookup task almost every Excel interview includes: bring a value across from a second table. The answer interviewers want, why VLOOKUP fails here, and a sheet that grades yours.

4 min read · Updated
Errors & fixesPractice sheet

#N/A error in Excel: what it means and how to fix it

#N/A means a lookup didn't find what it was looking for. Here are the six usual causes, how to spot each one on the sheet, and the fix, with a practice sheet.

2 min read · Updated

Know VLOOKUP? Prove it on a real sheet.

Practise VLOOKUP and the functions around it in a live grid that grades your result and explains your mistakes.

Runs in your browser · Graded on your result · No install