How to lookup/find values in another workbook?
In everyday work with Excel, you may often find yourself needing to retrieve information residing in another workbook. Whether you are compiling a summary, reconciling records between departments, or simply want to use reference data maintained separately, knowing how to look up values and return information from a different workbook is essential. This capability greatly improves data consistency and reduces manual errors, especially when you work with distributed data sources, large datasets, or workbooks shared with colleagues.
This article explores ways to find or search for values in another workbook and return relevant data directly into your active Excel file. It introduces three practical methods covering typical scenarios: the classic VLOOKUP function referencing open or closed workbooks, a VBA approach for dynamic needs, and alternative formula techniques. Detailed explanations and scenarios will help you choose the most suitable method for your workflow.
- Vlookup data and return values from another workbook in Excel
- Vlookup data and return values from another closed workbook with VBA
- Alternative formula solutions for cross-workbook lookup
Vlookup data and return values from another workbook in Excel
Suppose you are preparing a Fruit Purchase table in Excel, and you need to retrieve the latest fruit prices stored in another workbook. Instead of copying and pasting, you can easily lookup the fruit names from your source workbook and fetch the corresponding prices automatically, ensuring real-time accuracy and updates. Below demonstrates how you can accomplish this task using the VLOOKUP function.


Begin by opening both the workbook where you want to collect or summarize data and the source workbook that contains the information (e.g., prices).
Choose the cell where you wish to display the price of a fruit. Enter the following formula into that cell, replacing details as needed:
=VLOOKUP(B2,[Price.xlsx]Sheet1!$A$1:$B$24,2,FALSE)
After typing the formula, press Enter. If you want to apply this lookup for more rows, simply drag the Fill Handle (the small square at the bottom-right corner of the cell) down to fill as many cells as needed.


Explanation and Tips:
(1) In the example formula above:
- B2 is the cell containing the fruit to look up.
- Price.xlsx is the source workbook that holds the price data. Make sure the file name and extension are correct.
- Sheet1 is the sheet within the source workbook containing the lookup table.
- A$1:$B$24 is the range where both the key (e.g., fruit names) and the value (prices) are located. Adjust the range if your data area is different.
- 2 means values will be returned from the second column in the specified range.
- FALSE ensures an exact match is required; using TRUE might yield incorrect or approximate results.
(3) If you see a #N/A error, it usually means the lookup value does not exist in the source range. Double-check spellings, data ranges, and make sure all needed workbooks are available.
Using this method, you can consolidate up-to-date prices or information from external sources. The returned values will update automatically whenever the source workbook changes, as long as the referenced workbook is open or accessible at the correct path.
Advantages: Easy to set up for most users; data updates automatically.
Limitations: Formulas can become cumbersome if paths or workbook names change, and lookups across closed workbooks may slow down large files or prompt you to update links.
For more complex retrievals, or if you often need to reference data when the external workbook is closed, consider the VBA method or alternative formulas below.
![]() | Formula is too complicated to remember? Save the formula as an Auto Text entry for reusing with only one click in future! Read more⦠Free trial |

Unlock Excel Magic with Kutools AI
- Smart Execution: Perform cell operations, analyze data, and create chartsβall driven by simple commands.
- Custom Formulas: Generate tailored formulas to streamline your workflows.
- VBA Coding: Write and implement VBA code effortlessly.
- Formula Interpretation: Understand complex formulas with ease.
- Text Translation: Break language barriers within your spreadsheets.
Vlookup data and return values from another closed workbook with VBA
Configuring lookup references using VLOOKUP may be confusing, especially if you frequently change the source file's path, name, or worksheet. In such scenarios, automating the lookup process using VBA can be a more streamlined solution, allowing you to look up values even when the source workbook is closed and automating range selection and data return.
Follow these steps to use VBA for cross-workbook lookups:
1. Press Alt + F11 simultaneously to open the Microsoft Visual Basic for Applications editor window.
2. In the VBA editor, click Insert > Module, then copy and paste the following code into the module window:
VBA: Vlookup data and return values from another closed workbook
Private Function GetColumn(Num As Integer) As StringIf Num <=26 ThenGetColumn = Chr(Num +64)
ElseGetColumn = Chr((Num -1) \26 +64) & Chr((Num -1) Mod26 +65)
End IfEnd FunctionSub FindValue()
Dim xAddress As StringDim xString As StringDim xFileName As VariantDim xUserRange As RangeDim xRg As RangeDim xFCell As RangeDim xSourceSh As WorksheetDim xSourceWb As WorkbookOn Error Resume NextxAddress = Application.ActiveWindow.RangeSelection.AddressSet xUserRange = Application.InputBox("Lookup values :", "Kutools for Excel", xAddress, Type:=8)
If Err <>0 Then Exit SubSet xUserRange = Application.Intersect(xUserRange, Application.ActiveSheet.UsedRange)
xFileName = Application.GetOpenFilename("Excel Files (*.xlsx), *.xlsx",1, "Select a Workbook")
If xFileName = False Then Exit SubApplication.ScreenUpdating = FalseSet xSourceWb = Workbooks.Open(xFileName)
Set xSourceSh = xSourceWb.Worksheets.Item(1)
xString = "='" & xSourceWb.Path & Application.PathSeparator & _
"[" & xSourceWb.Name & "]" & xSourceSh.Name & "'!$"
For Each xRg In xUserRangeSet xFCell = xSourceSh.Cells.Find(xRg.Value, , xlValues, xlWhole, , , False)
If Not (xFCell Is Nothing) ThenxRg.Offset(0,2).Formula = xString & GetColumn(xFCell.Column +1) & "$" & xFCell.RowEnd IfNextxSourceWb.Close FalseApplication.ScreenUpdating = TrueEnd Sub Important details:
- The code returns the matched value in a column offset by2 columns from the lookup range. For example, if you select column B, results appear in column D.
- If you want the result to appear in a different column, change the number 2 in
xRg.Offset(0,2).Formulato another value (e.g., 1 for the next column, 3 for the third column to the right). - Choose the correct workbook and worksheet when prompted; the code will always use the first worksheet in the selected file. Adjust the code if your source sheet is not the first one.
- Always save your file before running unfamiliar macros. Macros cannot be undone after execution.
3. Execute the macro by pressing the F5 key or clicking the Run button. A dialog box titled "Kutools for Excel" will ask you to select the range of cells whose values you want to look up.

4. After selecting your range, click OK. Soon after, another dialog box will appear, prompting you to choose the source workbook (even if it is closed). Browse and select the appropriate file, then click Open to confirm.

When the macro completes, the corresponding values from the source workbook will be returned to the target column in your active sheet.If some values are missing, check that lookup values in the active sheet exactly match those in the source data (case and leading/trailing spaces matter for an exact match).

Advantages: Handles closed workbooks, avoids hardcoded file paths in formulas, and provides flexibility in selecting source files on the fly.
Considerations: Macros must be enabled; VBA may not work on protected sheets or with non-Excel files. Save your workbook with macro support (*.xlsm) if you plan on using this method frequently.
If you encounter any errors, ensure you do not have typos in sheet or file names, the selected range is appropriate, and the file paths are accessible. For debugging, consider stepping through the code line by line using the VBA editor.
Alternative formula solutions for cross-workbook lookup
In addition to the classic VLOOKUP approach and VBA, there are alternative ways to perform cross-workbook lookups in Excel. These may be preferable in certain situations where your data structure is different, you prefer formulas over macros, or you need more flexibility (such as searching leftwards or using multiple criteria).
Using INDEX and MATCH Functions Across Workbooks
With the combination of INDEX and MATCH, you can look up values in any directionβleft, right, above, or belowβin another workbook. This is especially useful when the column you want to retrieve data from is not to the right of the lookup column (a limitation of VLOOKUP).
Scenario: Suppose you want to retrieve a price from another open workbook, where the fruit name may not be the first column.
1. In your destination workbook, select the cell where you want to display the result (e.g., C2), and enter the formula below (replace workbook, sheet, and range as needed):
=INDEX([Price.xlsx]Sheet1!$B$1:$B$24, MATCH(B2, [Price.xlsx]Sheet1!$A$1:$A$24,0)) 2. Press Enter. Then copy or fill the formula to other rows as needed by dragging the Fill Handle.
Parameter explanation:
- [Price.xlsx]Sheet1!$B$1:$B$24: The range where prices are stored.
- B2: The fruit name to look up.
- [Price.xlsx]Sheet1!$A$1:$A$24: The range to search for your lookup value.
- The 0 at the end ensures an exact match.
Strengths: Works for left or right lookups; accommodates more flexible layouts.
Tips: Avoid moving or renaming source files without updating your formula.
Using XLOOKUP for Cross-Workbook Lookup (Excel365 and Later)
If you use Excel365 or Excel2021, the new XLOOKUP function is even more flexible. It allows you to easily find exact matches, support left-side lookups, and automatically handle missing values without errors.
To use it:
In the cell where you want the result, enter:
=XLOOKUP(B2, [Price.xlsx]Sheet1!$A$1:$A$24, [Price.xlsx]Sheet1!$B$1:$B$24, "Not found") Press Enter and copy the formula as needed. Here, "Not found" can be changed to any custom text you wish to display if a lookup fails.
Benefits: More flexible than VLOOKUP and easier to manage; avoids many common errors with legacy formulas. However, XLOOKUP is only available in newer Excel versions.
For complex requirements such as multi-criteria matching, searching in merged sheets, or avoiding performance issues in very large files, consider organizing source data in structured tables or using Excel's Power Query tool to link data between multiple workbooks efficiently.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
All Kutools add-ins. One installer
Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.
- All-in-one suite β Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
- One installer, one license β set up in minutes (MSI-ready)
- Works better together β streamlined productivity across Office apps
- 30-day full-featured trial β no registration, no credit card
- Best value β save vs buying individual add-in
