How to Use VLOOKUP Between 2 Tabs in Excel
In this article
VLOOKUP in Excel allows you to search for a value in one tab and return matching data from another tab. This is especially useful when working with related datasets—like customer IDs on one sheet and order details on another. By using VLOOKUP across tabs, you can consolidate information without manually copying or re-entering data. To succeed, ensure your lookup value (e.g., ID or name) appears in both sheets and that columns are correctly aligned.
What You'll Need
- Microsoft Excel (desktop or web version)
- Two or more worksheet tabs in the same workbook
- A common column between the tabs (e.g., ID, name, or code) to use as the lookup value
- Basic familiarity with Excel cell references and formulas
Step-by-Step
- Open your Excel workbook and identify the two tabs: one containing the data you want to look up (the source sheet), and the other where you want the result to appear (the destination sheet).
- In the destination tab, click the cell where you want the VLOOKUP result to appear.
- Start typing the formula:
=VLOOKUP(. Excel will display a tooltip showing the required arguments. - Enter the lookup value—this is the value you're searching for. It can be a cell reference (e.g., A2) or a specific value in quotes (e.g., "John"). Use a cell reference if you plan to copy the formula down a column.
- Add a comma, then switch to the source tab and select the entire data range that contains the lookup column and the return data. For example, if your data is in columns A to D on Sheet2, select
Sheet2!A:D. This defines the table array. - Add another comma, then enter the column index number. This is the position of the column you want to return data from, counting from the first column of your selected range. For example, if your range is A:D and you want data from column C, the index is 3.
- Add a comma and specify whether you want an exact or approximate match. Use
FALSEfor exact match (most common), orTRUEfor approximate. Always useFALSEunless you're working with sorted numerical ranges like tax brackets. - Close the parentheses and press Enter. Your complete formula might look like:
=VLOOKUP(A2, Sheet2!A:D, 3, FALSE). - Test the result. If it returns the correct data, copy the formula down the column by dragging the fill handle (small square at the bottom-right of the cell).
- Verify that all references remain correct when copied. If the table array shifts, go back and lock it with absolute references by pressing F4 or adding dollar signs:
Sheet2!$A:$D.
Common Mistakes
- Incorrect column index number: Counting from the worksheet’s column A instead of the first column of the selected range. Remember: the index starts at 1 for the leftmost column in your table array.
- Not using absolute references: When copying the formula, the table array changes unless locked with
$signs. Always use$A:$Dor$A$1:$D$100to prevent shifting. - Lookup value not in first column: VLOOKUP only searches the first column of the table array. If your ID is in column B of the range, it won’t work unless you restructure the data or use INDEX/MATCH.
- Extra spaces or mismatched data types: Text vs. number formats or leading/trailing spaces can cause #N/A errors. Use TRIM() and VALUE() functions to clean data if needed.
- Using approximate match incorrectly: Setting the last argument to TRUE without sorted data leads to wrong results. Stick to FALSE for exact matches unless you specifically need range lookup.
Tips
- Name your ranges using the Name Box (top-left of Excel) to make formulas cleaner. For example, name
Sheet2!$A:$Das "CustomerData" and use=VLOOKUP(A2, CustomerData, 3, FALSE). - Use IFERROR to handle missing values gracefully:
=IFERROR(VLOOKUP(A2, Sheet2!$A:$D, 3, FALSE), "Not Found"). - Double-check sheet names. If a tab has spaces (e.g., "Sales Data"), wrap it in single quotes:
'Sales Data'!$A:$D. - Consider using XLOOKUP (available in newer Excel versions) for more flexibility, including leftward searches and default exact matching.
- Test with a small dataset first to confirm the formula logic before applying it to hundreds of rows.
Troubleshooting
If VLOOKUP returns #N/A, #REF!, or #VALUE!, check the following:
- #N/A Error: The lookup value isn’t found. Confirm spelling, data types, and extra spaces. Use TRIM() or CLEAN() if needed. Ensure the value exists in the first column of your table array.
- #REF! Error: The column index exceeds the number of columns in the table array. For example, if your range has 4 columns but you specify column 5, it fails. Adjust the index number.
- #VALUE! Error: Usually due to a negative or zero column index, or a malformed reference. Verify the column number is positive and the sheet name is correctly formatted.
- Wrong Result: If you get data but it’s from the wrong row, ensure the table array starts at the correct column and that the lookup column is the leftmost in that range.
- Formula Doesn’t Copy Correctly: If dragging the formula changes the table array, make it absolute with dollar signs or use a named range.
Frequently Asked Questions
Can VLOOKUP pull data from a different Excel file?
Yes, but both files must be open. Reference the external file by name, like [Data.xlsx]Sheet1!$A:$D. Be cautious—moving or renaming files breaks the link.
Why does VLOOKUP only search the first column?
By design, VLOOKUP scans only the leftmost column of the specified range. To search other columns, restructure the data or use INDEX/MATCH or XLOOKUP.
Can I use VLOOKUP to search leftward?
No, VLOOKUP cannot return data from columns to the left of the lookup column. Use INDEX and MATCH instead for flexible two-way lookups.
What does FALSE mean in VLOOKUP?
It tells Excel to find an exact match. Use FALSE to avoid incorrect results from approximate matching, especially with text or unique IDs.
How do I make the formula faster with large datasets?
Use structured references or named ranges, limit the table array to only necessary rows, and avoid full-column references like A:A if possible.
Is VLOOKUP case-sensitive?
No, VLOOKUP treats uppercase and lowercase letters as the same. Use EXACT or array formulas with INDEX/MATCH if case sensitivity is required.