How to use VLOOKUP in Excel, including between two sheets

Type =VLOOKUP(value, range, column number, FALSE); put the sheet name and ! before the range to look up data on another sheet.

Read time
12 min
Word count
1.5K
Sections
9
FAQs
8
Share
Parts-store worker checks a printed parts list against a laptop, under a banner reading Use VLOOKUP in Excel
On this page · 9 sections
  1. VLOOKUP syntax: the four arguments
  2. Sample data: a product list
  3. How to use VLOOKUP in Excel, step by step
  4. How to use VLOOKUP between two sheets
  5. How to fix #N/A and other VLOOKUP errors
  6. VLOOKUP limits, and when to switch
  7. For IT teams and businesses
  8. How eCorpIT can help
  9. References

Summary. To use VLOOKUP in Excel, type =VLOOKUP(lookup_value, table_array, col_index_num, FALSE) in the cell where the answer should appear. For example, =VLOOKUP(F2,$A$2:$D$6,2,FALSE) finds the SKU in F2 in column A and returns the second column of the range. Use FALSE (or 0) for an exact match: without it, Excel uses an approximate match that expects a sorted first column and can return the wrong row. To look up data on another sheet, put the sheet name and an exclamation mark before the range, as in Products!$A$2:$D$6, and wrap names that contain spaces in single quotes, as in 'Price List'!$A$2:$D$6. Excel adds the quotes when you click the range. Most #N/A results come from a missing value, numbers stored as text, stray spaces or an approximate match on unsorted data, so fix the cause before adding IFNA. VLOOKUP works in Excel for Microsoft 365 on Windows and Mac, Excel 2024, 2021, 2019 and 2016, and Excel for the web. If every user has Microsoft 365 or Excel 2021 or later, XLOOKUP is the more flexible choice.

About this article. For anyone who builds or maintains Excel workbooks, including IT teams supporting shared templates. We checked the syntax, steps, shortcuts, error causes and version availability against Microsoft Support's Excel help, Microsoft Learn release notes and Microsoft's lifecycle pages on 15 November 2026, and recalculated every worked example. Labels can differ slightly between versions and update channels. Researched with AI assistance and reviewed by our editorial team.

VLOOKUP syntax: the four arguments

Microsoft gives the syntax as VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]). The first three arguments are required; the fourth is optional.

Argument What to enter In this guide's example
lookup_value The value to find: a cell reference or a value F2, which holds P-102
table_array The range to search. Its first column holds the lookup value, and it must include the column you want back A2:D6
col_index_num The column to return, counting the left-most column of table_array as 1 2 (Product)
range_lookup FALSE or 0 for an exact match; TRUE, 1 or blank for an approximate match on sorted data FALSE

Sample data: a product list

Type this into a sheet named Products (double-click the sheet tab to rename it). Row 1 holds headings; the data runs from A2 to D6.

Row A B C D
1 SKU Product Price Stock
2 P-101 USB-C cable 12.99 140
3 P-102 Wireless mouse 24.50 65
4 P-103 Laptop stand 39.00 22
5 P-104 HDMI adapter 17.25 0
6 P-105 Webcam 59.99 18

How to use VLOOKUP in Excel, step by step

These steps work in Excel for Windows, Mac and the web, checked against Excel for Microsoft 365 Current Channel Version 2610 (Build 20527.20196) and Excel for Mac 16.115, both released on 10 November 2026. The function is the same in Excel 2024, 2021, 2019 and 2016.

  1. In cell F2, type the SKU you want to find: P-102.
  1. Select cell G2, where the answer should appear.
  1. Type =VLOOKUP( and Excel shows the argument list as a tooltip.
  1. Select F2, then type a comma.
  1. Select A2:D6 and press F4 to change it to $A$2:$D$6, an absolute reference that stays put when you copy the formula. On a Mac, press Cmd+T or F4 (add Fn if the function key controls something else); F4 also works in Excel for the web.
  1. Type ,2,FALSE) and press Enter.

The finished formula is =VLOOKUP(F2,$A$2:$D$6,2,FALSE) and it returns Wireless mouse. Change the 2 to 3 and you get the price, 24.5; change it to 4 and you get the stock, 65.

To fill in boxes instead, select Formulas > Insert Function, search for VLOOKUP and complete the four fields; Excel describes each argument as you go. On a Mac, Shift+F3 opens the Formula Builder.

How to use VLOOKUP between two sheets

The usual job is pulling data from a reference list into a working sheet. Add a second sheet named Orders:

Row A B C D
1 Order ID SKU Price Stock
2 SO-5001 P-103 (formula) (formula)
3 SO-5002 P-101 (formula) (formula)
4 SO-5003 P-105 (formula) (formula)
  1. On the Orders sheet, select C2 and type =VLOOKUP(B2,.
  1. Select the Products sheet tab at the bottom of the window, then select A2:D6. Excel writes Products!A2:D6 into the formula.
  1. Press F4 so the range becomes Products!$A$2:$D$6.
  1. Type ,3,FALSE) and press Enter. C2 now holds =VLOOKUP(B2,Products!$A$2:$D$6,3,FALSE) and shows 39 for SO-5001.
  1. Drag the fill handle (the small square at the bottom-right corner of C2) down to C4. B2 becomes B3 and B4, but the locked range stays put, so you get 12.99 and 59.99.
  1. For stock, enter =VLOOKUP(B2,Products!$A$2:$D$6,4,FALSE) in D2 and fill down. The results are 22, 140 and 18.

Sheet names with spaces. If the sheet is called Price List, the name needs single quotes: =VLOOKUP(B2,'Price List'!$A$2:$D$6,3,FALSE). Names with spaces or other non-alphabetical characters need the quotes, and Excel adds them when you click the range.

Whole columns. A range such as Products!A:D picks up new rows automatically. Keep the lookup value a single cell (B2, not B:B): Microsoft notes that a whole-column lookup value can cause a #SPILL! error, which a single cell or the @ operator fixes.

Excel tables. The table_array argument can also be a named range or an Excel table. Convert the product list to a table, name it tblProducts in the Table Name box on the Table Design tab (our guide to naming a table has the steps), and the formula becomes =VLOOKUP(B2,tblProducts,3,FALSE). The table name covers the data rows without the header, and the reference adjusts as you add or remove rows.

VLOOKUP between two workbooks

With both workbooks open, start the formula, switch to the source file, select the range and finish typing. Excel writes a workbook link with absolute references, such as:


            =VLOOKUP(B2,[Prices.xlsx]Products!$A$2:$D$6,3,FALSE)
          

When you close Prices.xlsx, Excel adds the full path, for example 'C:\Reports\[Prices.xlsx]Products'!$A$2:$D$6. In Excel for Microsoft 365 on Windows, refresh, repoint or break these links from Data > Queries and Connections > Workbook Links; this pane replaced the older Edit Links command. Excel treats workbook links as potentially unsafe, so you may need to select Enable Content when you open the file. In Excel for the web, both workbooks must be saved in an online location your Microsoft 365 account can reach.

How to fix #N/A and other VLOOKUP errors

#N/A means VLOOKUP could not find the value. Microsoft's VLOOKUP, #N/A, #VALUE! and #NAME? pages list these causes and fixes.

Error Likely cause Fix
#N/A The value really is not in the first column Check spelling and that the item exists; handle genuine misses with IFNA
#N/A A number stored as text in one place and as a number in the other Make both the same type: Ctrl+1 (Format Cells, Number), or Data > Text to Columns > Finish
#N/A Leading or trailing spaces Remove them with TRIM
#N/A or a wrong value range_lookup is TRUE or blank and the first column is not sorted Use FALSE for an exact match
#N/A after filling down The range was not locked, so it slid down the sheet Use $A$2:$D$6 or a table name
#N/A The lookup value is not in the first column of table_array Start the range at the lookup column, or use XLOOKUP
#REF! col_index_num is larger than the number of columns in the range Recount the columns in table_array
#VALUE! col_index_num is text or less than 1 Use a number of 1 or more
#VALUE! The lookup value is longer than 255 characters Shorten it, or use INDEX and MATCH
#NAME? Text typed without double quotation marks, or a misspelled function name Add the quotation marks; check the spelling
#SPILL! A whole column such as A:A used as the lookup value Use a single cell (A2) or the @ operator (@A:A)

Once the data is clean, replace genuine misses with a message:


            =IFNA(VLOOKUP("P-109",$A$2:$D$6,3,FALSE),"Not found")
          

This returns Not found because P-109 is not in the list. IFNA arrived in Excel 2013 and catches only #N/A. IFERROR also catches #REF!, #NAME? and other errors, which can hide a broken formula, and Microsoft's #NAME? guidance says to correct the syntax rather than mask that error.

Note that a stock of 0 for P-104 is a correct result. Microsoft also advises against storing numbers or dates in the first column as text, which can make VLOOKUP return unexpected values.

VLOOKUP limits, and when to switch

  • It only looks right. Microsoft notes that VLOOKUP can only look up from left to right. For a column on the left, use INDEX with MATCH, or XLOOKUP.
  • The column number is fixed. Insert a column inside the range and col_index_num 3 may now point at different data.
  • The default is approximate. Leaving out FALSE is a common cause of wrong answers.
  • It searches columns, not rows. HLOOKUP takes the same arguments but searches across rows, so use HLOOKUP for tables with headings across the top.

The XLOOKUP version of the cross-sheet formula is:


            =XLOOKUP(B2,Products!$A$2:$A$6,Products!$C$2:$C$6,"Not found")
          

XLOOKUP defaults to an exact match and can return a column on either side of the lookup column, but Microsoft says it is not available in Excel 2016 or 2019. Our XLOOKUP guide covers its match and search modes.

For IT teams and businesses

VLOOKUP sits inside many business-critical spreadsheets. A few habits reduce the support load:

  • Watch workbook links. A lookup that points at another file breaks when that file is renamed or moved. The Workbook Links pane lists every source and offers Change source to repair a broken link. Where possible, keep the reference list in the same workbook.
  • Plan for mixed versions. XLOOKUP is not available in Excel 2016 or 2019, so templates shared with those users should stay on VLOOKUP or INDEX with MATCH. Both versions reached end of support on 14 October 2025, and Excel 2021 followed on 13 October 2026.
  • Stop bad inputs at the source. A drop-down list on the lookup column (SKU, employee ID) prevents many typos that cause #N/A.
  • Know when a spreadsheet has outgrown itself. Thousands of lookups across monthly exports become slow and fragile; a database, a Power Query merge or a reporting tool is usually a better home.

How eCorpIT can help

eCorpIT is a Gurugram-based technology organisation, founded in 2021, assessed at CMMI Level 5 and MSME certified, with senior-led engineering teams working across AWS, Microsoft and Google platforms. Our data and analytics services team helps organisations move lookup-heavy spreadsheets into dependable reporting, data models and Microsoft 365 workflows. Talk to us at /contact-us/.

Last updated: 15 November 2026.

References

  1. VLOOKUP function — Microsoft Support
  1. Create workbook links — Microsoft Support
  1. How to correct a #N/A error — Microsoft Support
  1. Excel functions (alphabetical) — Microsoft Support
  1. XLOOKUP function — Microsoft Support
  1. Rename a worksheet — Microsoft Support
  1. Update history for Microsoft 365 Apps (listed by date) — Microsoft Learn
  1. Release notes for Office for Mac — Microsoft Learn
  1. How to correct a #NAME? error — Microsoft Support
  1. Switch between relative, absolute, and mixed references — Microsoft Support
  1. Keyboard shortcuts in Excel — Microsoft Support
  1. Using structured references with Excel tables — Microsoft Support
  1. Manage workbook links — Microsoft Support
  1. How to correct a #VALUE! error in the VLOOKUP function — Microsoft Support
  1. IFNA function — Microsoft Support
  1. IFERROR function — Microsoft Support
  1. Look up values with VLOOKUP, INDEX, or MATCH — Microsoft Support
  1. Ending Support in 2025 — Microsoft Learn
  1. Ending Support in 2026 — Microsoft Learn

Frequently asked

Quick answers.

01 How do I use VLOOKUP in Excel step by step?
Select the result cell and type =VLOOKUP(, then the cell holding the value to find, a comma, the table range with the lookup column first, the column number to return and FALSE. For example, =VLOOKUP(F2,$A$2:$D$6,2,FALSE) returns the product name for the SKU typed in F2. Press Enter to finish.
02 How do I use VLOOKUP between two sheets?
Start the formula on the first sheet, then select the other sheet's tab and select the lookup range. Excel adds the sheet name and an exclamation mark, such as Products!$A$2:$D$6. Finish with the column number and FALSE. Sheet names that contain spaces need single quotes, for example 'Price List'!$A$2:$D$6.
03 Why is my VLOOKUP returning #N/A when the value is there?
The two values look the same but are not identical. Common causes are a number stored as text on one sheet, leading or trailing spaces, a range without dollar signs that shifted when you filled down, or TRUE instead of FALSE. Check the format, apply TRIM, lock the range and use FALSE.
04 What does FALSE mean in VLOOKUP?
FALSE, or 0, is the range_lookup argument and tells VLOOKUP to find an exact match. TRUE, 1 or a blank asks for an approximate match, which assumes the first column is sorted and returns the closest value. For IDs, names and product codes, use FALSE to avoid wrong results.
05 Can VLOOKUP look to the left?
No. VLOOKUP searches only the left-most column of the range and returns values from that column or columns to its right. To return a column on the left, use INDEX with MATCH, which works in every Excel version, or XLOOKUP, which needs Microsoft 365, Excel 2021 or later, or Excel for the web.
06 Does VLOOKUP work in Excel for Mac and Excel for the web?
Yes. Microsoft documents VLOOKUP for Excel for Microsoft 365 on Windows and Mac, Excel 2024, 2021, 2019 and 2016, and Excel for the web. The syntax and arguments are identical. Small details differ: on a Mac, Cmd+T or F4 toggles absolute references, and some function keys need the Fn key.
07 Can VLOOKUP pull data from another workbook?
Yes. Open both files, start the formula in the destination workbook, switch to the source workbook and select the range. Excel writes a workbook link with the file name in square brackets and adds the full path when the source is closed. Manage these links from the Workbook Links pane on the Data tab.
08 Should I use VLOOKUP or XLOOKUP?
Use XLOOKUP if everyone who opens the file has Microsoft 365, Excel 2021, Excel 2024 or Excel for the web; it defaults to an exact match and can look left. Use VLOOKUP when the workbook must also work in Excel 2016 or 2019, where XLOOKUP is not available.

About the author

Manu Shukla

Founder & Director

Founder of eCorpIT. Hands-on engineer leading senior-only delivery for AI apps, custom software, and cloud systems for global clients.

Subscribe

One engineering note a week. No fluff, no spam.

Senior-architect playbooks on AI agents, mobile apps, cloud, security, data, and marketing — delivered every Wednesday.

Past the reading

Read enough. Let's build something.

A senior architect responds in 24 working hours with scope, indicative cost, and a timeline. NDA before any technical conversation.

Loading search…

Browse all guides