VLOOKUP between two tabs lets you pull matching data from one sheet into another—for example, bringing a price list from a “Products” tab into an “Orders” tab. The formula looks up a value in the first column of a table on another sheet and returns a value from a column you specify. This guide walks you through the exact steps in Excel for Microsoft 365, with notes for Mac and Excel for the web.
What You’ll Need
- Two tabs (sheets) in the same Excel workbook.
- The lookup value (like a product ID) must be in the first column of the table on the second tab.
- The column you want to return must be to the right of the lookup column.
- Basic familiarity with cell references (like A2 or B5).
Step-by-Step
- Identify your lookup value and table. Decide which cell on the first tab contains the value you want to look up (e.g., product ID in A2). On the second tab, note the range that contains the lookup column and the return column (e.g., A2:C100).
- Click the cell where you want the result. On the first tab, click the cell where you want the matched data to appear (e.g., B2).
- Start typing the VLOOKUP formula. Type
=VLOOKUP(in that cell. Excel will show a formula suggestion—press Tab to accept. - Add the lookup value. Click the cell on the first tab that contains the value you want to look up (e.g., A2), or type its reference. Add a comma.
- Switch to the second tab and select the table. Click the tab name (e.g., “Products”), then drag to select the range that includes the lookup column and the return column (e.g., A2:C100). Add a comma. The formula will show something like
=VLOOKUP(A2,Products!A2:C100,. - Enter the column index number. Type the number of the column in the table that contains the value you want to return. Count from the left: column A is 1, B is 2, C is 3, and so on. For example, if the price is in column C, type
3. Add a comma. - Choose exact or approximate match. Type
FALSEfor an exact match (most common), orTRUEfor an approximate match (requires sorted data). Close the parenthesis and press Enter. - Check the result. The formula should return the matching value. If it shows #N/A, the lookup value isn’t found in the first column of the table.
- Copy the formula down. Click the cell with the formula, then double-click the small square at the bottom-right corner (the fill handle) to copy it down the column. Ensure the lookup value reference updates correctly (e.g., A2 becomes A3).
Common Mistakes
- Lookup column not first: VLOOKUP only searches the first column of the selected range. If your ID is in column B, VLOOKUP won’t find it.
- Wrong column index: Counting incorrectly can return the wrong column’s data. Double-check the column number.
- Using TRUE without sorting: Approximate match (TRUE) requires the first column to be sorted A-Z or smallest to largest; otherwise, results are unpredictable.
- Mismatched data types: If the lookup value is text but the table has numbers (or vice versa), VLOOKUP won’t match. Format both consistently.
- Extra spaces: Leading or trailing spaces in either the lookup value or the table’s first column cause #N/A. Use
=TRIM()to clean data.
Tips
- Use absolute references: When copying the formula down, lock the table range with dollar signs (e.g.,
$A$2:$C$100) to prevent it from shifting. - Consider XLOOKUP: If you have Excel 2021 or Microsoft 365, XLOOKUP is more flexible—it can search any column and doesn’t require the lookup column to be first. Syntax:
=XLOOKUP(A2, Products!A:A, Products!C:C). - Name your range: Select the table on the second tab, go to the Name Box (left of the formula bar), type a name like “ProductTable”, and press Enter. Then use
=VLOOKUP(A2, ProductTable, 3, FALSE). - Handle errors gracefully: Wrap the formula in
=IFERROR(VLOOKUP(...), "Not Found")to display a friendly message instead of #N/A. - Sort for approximate match: If you must use TRUE, sort the first column ascending first.
Troubleshooting
- #N/A error: The lookup value isn’t in the first column of the table. Check for typos, extra spaces, or number vs. text format. Use
=TRIM()and ensure both are the same data type. - #REF! error: The column index number is greater than the number of columns in the selected range. Adjust the range or the index.
- #VALUE! error: The column index is less than 1, or the formula has a syntax issue. Check commas and parentheses.
- Formula returns wrong value: The column index is likely incorrect, or the table range doesn’t start at the lookup column. Verify the range and index.
- Formula not updating: If you change data and the result doesn’t update, press F9 to recalculate (or Ctrl+Alt+F9 on Windows). On Mac, press Cmd+=.
- Copying formula gives wrong results: The lookup value reference may be shifting incorrectly, or the table range isn’t absolute. Use $ signs to lock the range.
Frequently Asked Questions
Can I use VLOOKUP to return a value from a column to the left of the lookup column?
No, VLOOKUP only returns from columns to the right. Use INDEX/MATCH or XLOOKUP instead.
What is the difference between TRUE and FALSE in VLOOKUP?
FALSE finds an exact match. TRUE finds the closest match that is less than or equal to the lookup value, but the first column must be sorted ascending.
How do I do a VLOOKUP between two different workbooks?
Open both workbooks, and in the formula, reference the other workbook by name, like =VLOOKUP(A2, '[OtherWorkbook.xlsx]Sheet1'!$A$2:$C$100, 3, FALSE). The path appears automatically when you click the other workbook’s cells.
Why is my VLOOKUP returning #N/A even though the value exists?
Check for invisible characters, extra spaces, or number stored as text. Use =TRIM() and try converting text to numbers with =VALUE().
Can I use VLOOKUP with two criteria?
VLOOKUP alone can’t handle two criteria. Use a helper column that concatenates the criteria, or use XLOOKUP with a concatenation, or use INDEX/MATCH with an array formula.
Does VLOOKUP work in Google Sheets?
Yes, the syntax is identical: =VLOOKUP(A2, Products!A2:C100, 3, FALSE). The steps are the same, but note that Google Sheets may handle ranges differently when copying.
Related
- Google Sheets Split Cell Into Two: 3 Easy Ways
- Shortcut to Switch Tabs? The Complete Guide
- Butterfly Life Cycle Worksheet: Free Printables & How to Use Them
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Rank in Excel With Ties: RANK.EQ and Unique RanksTo give equal values the same rank in Excel, enter a RANK.EQ formula. With scores in B2:B6, put…
- Excel Formula to Randomly Select From a ListWith names in A2:A20, use =INDEX(A2:A20,RANDBETWEEN(1,ROWS(A2:A20))) to return one randomly chosen entry. The formula selects a row position…
- How to Use the NOT Function in Excel: A Practical GuideTo reverse a logical value in Excel, use the NOT function: with TRUE in A2, enter =NOT(A2) in…
- Excel Formula for Number of Hours WorkedTo calculate hours worked when a shift starts in A2 and ends in B2 on the same day,…
- VLOOKUP Errors in Excel: Causes, Checks, and FixesIf VLOOKUP returns an error, first check that the lookup value is in the leftmost column of the…
- Excel LAMBDA Function Explained SimplyThe LAMBDA function in Excel lets you create custom, reusable functions using standard Excel formulas, without needing VBA…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.