How to Import Comments from Multiple Excel Workbooks into a Master File
Question details
The user needs to consolidate comments from 30 to 50 separate category workbooks into a single master Excel workbook using a unique reference.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Consolidating dataset comments from dozens of source files into a centralized master file when Power Query is not available.
- Observed behavior
- Comments are currently spread across multiple separate workbooks and must be accurately mapped to the master file using unique reference IDs.
Ensure all your category workbooks are stored in the same folder and share a consistent structure, ideally with the unique reference in column A and the comments in column B.
Use VLOOKUP Formulas to Retrieve Comments
An accessible method using standard Excel formulas to pull data from external workbooks based on a unique reference identifier.
This method involves referencing external files directly via formulas. It is best suited when dealing with a manageable number of files, as each external workbook will require its own dedicated column in the master file.
Ensure each of your Category workbooks contains the unique reference ID in Column A and the comments you wish to import in Column B.
Open your Master workbook. Confirm that Column A contains the master list of unique IDs you want to match against the external files.
In Column B of the Master file, enter the formula =VLOOKUP(A2, '[Category1.xlsx]Sheet1'!$A:$B, 2, FALSE) and press Enter. Drag the fill handle down to apply it to all rows.
Add additional columns (C, D, etc.) for each remaining category workbook, using the same VLOOKUP structure but updating the filename inside the brackets to match each specific file.

Automate Consolidation Using a VBA Macro
A highly scalable solution when working with 30 to 50 workbooks, saving time by automating the opening, matching, and copying process.
Consolidate Workbooks Easily with WPS Spreadsheet
WPS Spreadsheet provides powerful tools to manage multiple workbooks efficiently. With its tabbed interface, handling external links, running complex VLOOKUP functions, and executing VBA macros to consolidate large datasets is incredibly smooth.
- 1. Install the Software: Download and install WPS Office for free from the official website.
- 2. Open Your Workbooks: Launch WPS Spreadsheet and open your Master and Category workbooks within its intuitive tabbed viewing window.
- 3. Process the Data: Apply standard VLOOKUP formulas to pull your comments, or press Alt+F11 to run your existing VBA macro without needing to change any syntax.
- 4. Save Master File: Save your consolidated Master workbook in the standard .xlsx format to ensure ongoing compatibility.

Frequently Asked Questions
Can I use XLOOKUP instead of VLOOKUP to import comments from other workbooks?
Yes. If your spreadsheet software supports it, XLOOKUP is an excellent alternative. It allows more flexible data retrieval and does not require the unique reference ID to be placed strictly in the first column of your source data.
Why do my external VLOOKUP formulas return a #REF! error?
A #REF! error usually means the external category workbook has been moved, renamed, or deleted, breaking the file path. It can also occur if the referenced worksheet name inside the source file has been changed.
How can I merge comments from 50 workbooks if I don't know how to use VBA?
Without using VBA or Power Query, you must manually set up a VLOOKUP column for each individual file in your Master workbook. While time-consuming, copying the first formula and simply altering the file name reference for the next 49 columns is a reliable workaround.




