Excel functions · Lookup

VLOOKUP function in Excel

VLOOKUP looks for a value in the first column of a table and returns the value from another column in the same row, counted from the left. It works in every version of Excel, but it can only return columns to the right of the lookup column, and it uses approximate match unless you end it with FALSE.

Last reviewed

Syntax

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
lookup_valuerequired
The value to find in the first column of table_array.
table_arrayrequired
The table to search. Its first column is the one searched.
col_index_numrequired
Which column of table_array to return: 1 is the first column, 2 the second, and so on.
range_lookupoptional
FALSE for an exact match. TRUE, or left out, finds the largest value less than or equal to lookup_value and needs the first column sorted ascending.
  • Always end with FALSE unless you're matching against sorted bands such as tax or commission tiers.
  • The column number is fixed, so inserting a column inside table_array can make the formula return the wrong column.
  • It returns the first match only, and matching ignores case.

Which versions have VLOOKUP

Every current Excel version: Microsoft 365, Excel for the web, Excel 2024, 2021, 2019 and 2016, on Windows and Mac.

VLOOKUP availability by Excel version
VersionHas it
Microsoft 365 (Windows and Mac)Yes
Excel for the webYes
Excel 2024Yes
Excel 2021Yes
Excel 2019Yes
Excel 2016Yes

Google Sheets

Google Sheets has VLOOKUP with the same four arguments; its is_sorted argument also defaults to TRUE (approximate match), so add FALSE there too.

Examples

The examples use these sample ranges on one sheet.

Products (A1:D7)
RowABCD
1SKUProductCategoryPrice
2P-101Desk lampOffice24.50
3P-102Monitor standOffice39.00
4P-103USB-C hubElectronics45.00
5P-104WebcamElectronics69.00
6P-105Desk chairFurniture189.00
7P-106FootrestFurniture32.00
Commission tiers (F1:G4)
RowFG
1Sales fromRate
202%
310003%
450005%
  1. 1.Exact match on a SKU

    =VLOOKUP("P-104", A2:D7, 4, FALSE)

    Result: 69.00

    Price is the 4th column of A2:D7, so VLOOKUP returns the Webcam's price.

  2. 2.Return the product name

    =VLOOKUP("P-102", A2:D7, 2, FALSE)

    Result: Monitor stand

    Column 2 of the table is Product.

  3. 3.Approximate match for tiers

    =VLOOKUP(3200, F2:G4, 2, TRUE)

    Result: 3%

    3,200 isn't in the table, so VLOOKUP takes the largest tier that's not above it (1,000) and returns its rate. The tiers must be sorted ascending.

Common errors and fixes

VLOOKUP errors, causes and fixes
ErrorWhy it happensFix
#N/ANo exact match: the key is missing, has extra spaces, or is a number stored as text.Check the key, clean it with TRIM, or wrap the formula in IFERROR to show a message.
#REF!col_index_num is bigger than the number of columns in table_array.Widen table_array or lower the column number.
#VALUE!col_index_num is less than 1.Use 1 or more.
Wrong value, no errorrange_lookup was left out, so VLOOKUP did an approximate match on unsorted data.Add FALSE as the fourth argument.

Do it with GPTExcel

Skip writing VLOOKUP by hand

Upload your Excel or CSV file to Chat and ask in plain English. GPTExcel writes the formula for your file and your version of Excel or Google Sheets.

your-file.xlsx

Look up each customer's region from the Customers sheet and add it to my sales table.

Done. I used VLOOKUP on your sheet and checked the results against your data.

your-file-updated.xlsxYour original stays unchanged
  • Written for your platform and version
  • Checked against your actual data
  • Newest functions looked up in official docs
Try it free Formula Generator

Free plan, no credit card.

VLOOKUP questions

Why does VLOOKUP return the wrong value?
Most often the fourth argument is missing. Without FALSE, VLOOKUP does an approximate match and, on unsorted data, can return a row that isn't yours. End the formula with FALSE for an exact match.
Can VLOOKUP look to the left?
No. VLOOKUP only returns columns to the right of the first column of table_array. Use XLOOKUP, or INDEX with MATCH, to return a column on the left.
Should I use VLOOKUP or XLOOKUP?
Use XLOOKUP if everyone opening the file has Microsoft 365 or Excel 2021 or later. Use VLOOKUP, or INDEX with MATCH, when the file must work in Excel 2019 or older.

Skip the formula hunt

Upload a spreadsheet and ask in plain English. Free plan, no credit card.

Start free