How to do vlookup in excel with two spreadsheets
Tutor 5 (120 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
VLOOKUP searches for a value in the first column of a table and returns a value from another column in the same row. When working with two spreadsheets, you reference data from one spreadsheet while performing the lookup operation in another spreadsheet.
Setting Up Your Spreadsheets
Prepare your lookup table in one spreadsheet with data organized vertically. The lookup value must be in the leftmost column, and the return value must be in a column to the right of it. Arrange your main data in the second spreadsheet where you want to display the results.
VLOOKUP Syntax for Multiple Spreadsheets
The formula structure references the external spreadsheet using the following format:
Replace SheetName with the actual name of the lookup spreadsheet, specify the cell range containing your data, enter the column index number (starting from 1 for the first column), and use FALSE for exact matches.
Steps to Create a VLOOKUP Formula Across Spreadsheets
- Open both spreadsheets in the same workbook or ensure you have access to both files.
- Click on the cell in your main spreadsheet where you want the result to appear.
- Type the formula starting with an equals sign:
=VLOOKUP( - Enter the lookup value, which can be a cell reference from your current spreadsheet (for example,
A2). - Type a comma, then reference the lookup table range in the other spreadsheet using the format
SheetName!$A$1:$D$100(adjust the sheet name and range to match your data). - Type a comma, then enter the column index number representing which column contains your return value (the first column in your range is 1, the second is 2, and so on).
- Type a comma, then enter FALSE for an exact match or TRUE for an approximate match.
- Close the parenthesis and press Enter to execute the formula.
Referencing External Files
When your lookup spreadsheet exists in a different workbook file, use this format:
Include the file path in square brackets, followed by the sheet name with an exclamation point.
Common Errors and Troubleshooting
#N/A error indicates the lookup value does not exist in the lookup table. Verify the value appears in the first column of your referenced range and check for extra spaces or formatting differences.
#REF! error means Excel cannot find the referenced spreadsheet or range. Confirm the sheet name is spelled correctly and the range exists in the specified location.
#VALUE! error occurs when the column index number is invalid. Ensure you entered a positive integer that does not exceed the number of columns in your range.
Windows Versus Mac Differences
Windows Excel uses the same VLOOKUP syntax as Mac Excel. Both versions reference external sheets with the format
SheetName!Range. No syntax differences exist between the two operating systems for this function.Using VLOOKUP with Named Ranges
Create a named range in your lookup spreadsheet to simplify your formula. Select the lookup table range, go to the Name Box (top left of the formula bar), type a descriptive name like "LookupTable," and press Enter. Your VLOOKUP formula then becomes:
Performance Considerations
VLOOKUP performance decreases with larger datasets. Keep lookup tables organized with sorted data when using approximate matches. Limit cross-spreadsheet references to improve calculation speed, particularly in workbooks with numerous formulas.
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to track changes in excel
Answers · 1
How to lock certain cells in excel
Answers · 1
How to merge two excel spreadsheets
Answers · 1
Where is the name box in excel
Answers · 1