What Is VLOOKUP in Excel? Formula, Examples and Common Errors – LicenceHouse guide

VLOOKUP is an Excel function that searches for a value in the first column of a table and returns a value from another column in the same row. The formula is =VLOOKUP(lookup_value, table_array, col_index_num, FALSE). For example, =VLOOKUP("P-102",A2:D6,3,FALSE) finds P-102 in column A and returns the matching entry from column C.

Argument What to put there Example
lookup_value The value you are searching for F2 or "P-102"
table_array The range to search; the lookup value must be in its first column $A$2:$D$6
col_index_num Which column of that range to return, counting the first as 1 3
range_lookup FALSE for an exact match; TRUE or omitted for an approximate match FALSE

What is VLOOKUP in Excel used for?

VLOOKUP pulls matching information from one table into another, so you don't have to find and copy it by hand. Typical uses are fetching a product name from a code, a customer's region from an ID, or an employee's department from a staff number. The "V" stands for vertical, because it searches down a column. Its sibling HLOOKUP searches across a row.

Microsoft's VLOOKUP function reference lists the four arguments above. The key rule to remember is that VLOOKUP only looks to the right: the column you search must be the leftmost column of table_array.

How does VLOOKUP work? A worked example

Suppose this product list sits in A1:D6:

VLOOKUP formula card for =VLOOKUP(F2,$A$2:$D$6,2,FALSE), explaining each argument; looking up P-103 returns Monitor.

A (Code) B (Product) C (Unit cost) D (Stock)
2 P-101 Keyboard 18.40 120
3 P-102 Mouse 7.90 310
4 P-103 Monitor 96.00 45
5 P-104 Webcam 22.75 0
6 P-105 Headset 31.20 88
  1. Type a code to look up in F2, for example P-103.
  2. In G2, enter =VLOOKUP(F2,$A$2:$D$6,2,FALSE). Excel returns Monitor.
  3. Change the 2 to 4 to return the stock level instead: =VLOOKUP(F2,$A$2:$D$6,4,FALSE) gives 45.

The dollar signs lock the table range so you can copy the formula down a column of codes without the range sliding. Press F4 while the range is selected in the formula to add them, or use Ctrl+D to fill the formula down, as covered in our guide to Excel keyboard shortcuts.

Why does my Excel VLOOKUP not work?

Most failed VLOOKUPs return #N/A, which means Excel could not find the lookup value. Work through these causes in order:

Table of VLOOKUP errors and fixes: #N/A from spaces, text numbers or wrong column, wrong rows without FALSE, #REF! and #NAME? causes.

  1. The last argument is missing. Without FALSE, VLOOKUP does an approximate match, which assumes sorted data and can return a wrong row without any error.
  2. Extra spaces. "P-103 " with a trailing space doesn't match "P-103". Clean the data with =TRIM(A2).
  3. Numbers stored as text. A code typed as the number 1001 won't match the text "1001". Make both sides the same type, for example with =VLOOKUP(TEXT(F2,"0"),...) or by converting the column with Data > Text to Columns > Finish.
  4. The value isn't in the first column. VLOOKUP can't look left. Rearrange the range, or use INDEX/MATCH or XLOOKUP.
  5. The range isn't locked. Without $ signs, copying the formula moves the table and later rows miss the data.

A #REF! error means col_index_num is larger than the number of columns in table_array. A #NAME? error usually means a typo in the function name or missing quotes around a text lookup value.

What we commonly see: someone inserts a new column into the middle of the lookup table and every VLOOKUP silently starts returning the wrong field. The hard-coded 3 still points at the third column, which is now different data. Using MATCH to calculate the column number, or switching to XLOOKUP, prevents this.

What does "VLOOKUP evaluates to an out of bounds range" mean?

That exact message comes from Google Sheets, not Excel. It means the column index is bigger than the number of columns in your range, for example asking for column 5 of a four-column range. In Excel, the same mistake shows as #REF!. The fix is identical: widen table_array or reduce col_index_num.

How do I use VLOOKUP with multiple conditions?

VLOOKUP accepts only one lookup value, so join your conditions into one key. Add a helper column to the left of the table that combines the fields, then look up the same combination.

Steps for VLOOKUP with two conditions: add a helper column joining Region and Product with a pipe, then look up the joined key with FALSE.

  1. Insert a new column A and in A2 enter =B2&"|"&C2, for example joining Region and Product. Fill it down.
  2. Look up the joined value: =VLOOKUP(G2&"|"&H2,$A$2:$E$50,5,FALSE).

The pipe character stops accidental matches such as "AB"+"C" and "A"+"BC" producing the same key. Without a helper column, XLOOKUP handles this directly: =XLOOKUP(1,(B2:B50=G2)*(C2:C50=H2),E2:E50).

How do I return multiple columns with VLOOKUP?

Give VLOOKUP an array of column numbers instead of one number. =VLOOKUP(F2,$A$2:$D$6,{2,3,4},FALSE) returns the product, unit cost and stock in three adjacent cells. In Excel 2021, Excel 2024 and Microsoft 365 the results spill across automatically. In Excel 2019 and earlier, select three cells first and confirm with Ctrl+Shift+Enter, or write one VLOOKUP per column.

How do I sum values with VLOOKUP in Excel?

To add up several columns for one match, wrap the multi-column VLOOKUP in SUM: =SUM(VLOOKUP(F2,$A$2:$F$50,{3,4,5},FALSE)). In Excel 2019 and earlier, confirm it with Ctrl+Shift+Enter.

Be careful with the other kind of sum. VLOOKUP returns only the first match, so it cannot total every row for a code that appears several times. For that, use =SUMIF($A$2:$A$50,F2,$D$2:$D$50), which adds every value in column D where column A equals F2.

Advanced nuance: an approximate-match VLOOKUP (TRUE) on a sorted column is not just a legacy setting. It is the right tool for banded lookups such as tax brackets or commission tiers, where you want the largest value that is less than or equal to the lookup value. Just make sure the first column is sorted smallest to largest.

INDEX MATCH vs VLOOKUP: which should you use?

INDEX/MATCH is more flexible than VLOOKUP because it can look left and doesn't break when columns move. The pattern is =INDEX(return_range, MATCH(lookup_value, lookup_range, 0)), for example =INDEX($B$2:$B$6,MATCH(F2,$A$2:$A$6,0)). VLOOKUP is shorter and easier to read for simple left-to-right lookups.

If you have Excel 2021, Excel 2024 or Microsoft 365, XLOOKUP replaces both: =XLOOKUP(F2,$A$2:$A$6,$B$2:$B$6,"Not found"). It defaults to an exact match, looks in any direction and has a built-in "not found" value. XLOOKUP is not available in Excel 2016 or Excel 2019, so files shared with people on those versions should stick to VLOOKUP or INDEX/MATCH. Our Office versions comparison shows what each release includes, and Office 2024 Professional Plus for Windows is one way to get XLOOKUP without a subscription. VLOOKUP itself works the same in every version, on Windows and Mac.

Frequently asked questions

What is a VLOOKUP in simple terms?

A VLOOKUP is a formula that works like looking up a name in a phone book. You give it something to find, tell it where the list is, and say which column of information you want back. Excel finds the row that matches and returns the value from the column you asked for, all in one cell.

Why does VLOOKUP return the wrong value?

Usually because the last argument is missing or set to TRUE, which tells Excel to find an approximate match in a sorted list. On unsorted data, that returns a nearby row instead of an error. Add FALSE as the fourth argument for an exact match. Also check that a column wasn't inserted inside the lookup range, which shifts the returned column.

Can VLOOKUP look to the left?

No. VLOOKUP always searches the first column of the range and returns values from columns to its right. To return a value from a column on the left, use INDEX with MATCH, or use XLOOKUP in Excel 2021, Excel 2024 or Microsoft 365. Both let the lookup column and the return column sit anywhere.

How do I hide #N/A when VLOOKUP finds nothing?

Wrap the formula in IFERROR or IFNA: =IFNA(VLOOKUP(F2,$A$2:$D$6,2,FALSE),"Not found"). IFNA is safer because it only catches the not-found case, while IFERROR also hides genuine mistakes such as a #REF! from a wrong column number. Both functions are available in all current versions of Excel.

Can VLOOKUP search another sheet or workbook?

Yes. Point table_array at the other sheet, for example =VLOOKUP(A2,Prices!$A$2:$D$500,3,FALSE). For another workbook, open both files and click into the range while writing the formula; Excel adds the file name in square brackets. If the source workbook is later moved or renamed, update the link through Data > Edit Links, which Microsoft 365 now calls Workbook Links.

Related guides

Links in this guide

Link Type Why it helps
Microsoft Support: VLOOKUP function External Official syntax, arguments and error notes
Excel keyboard shortcuts Internal Fill-down and F4 shortcuts used with lookups
Microsoft Support: XLOOKUP function External Official reference for the modern replacement
Office versions compared Internal Shows which versions include XLOOKUP
Office 2024 Professional Plus for Windows Internal A perpetual Excel version with XLOOKUP
Excel tutorial for beginners Internal Formula basics behind VLOOKUP
Excel 2024 vs Excel in Microsoft 365 Internal Lookup functions by version
Office 2024 vs Office 2021 Internal Upgrade view for Excel 2021 users
Excel, Excel formulas, How-to, Troubleshooting