How to Consolidate Excel Tabs into a Master Sheet by Matching Rows
Question details
The user needs to merge data from various department worksheets into a centralized master sheet by accurately matching unique section names.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Consolidating data scattered across multiple department tabs into one master summary sheet where row orders and positions might differ.
- Observed behavior
- The user requires a method to align data into the correct rows on the master sheet based on specific identifiers, rather than blindly copying and pasting data that may not match up.
Ensure that each department tab contains a unique identifier column (like a section name or ID) that perfectly matches the spelling and formatting in your master sheet.
Consolidate Data Using the VLOOKUP Formula
The most direct way to pull specific row data from different tabs is to use the VLOOKUP function paired with IFERROR to handle missing values neatly.
Using VLOOKUP allows you to search for a unique identifier (like a section name) in a department tab and return the corresponding data to your master sheet, even if the rows are sorted differently.
Open your master tab and ensure column A contains your unique identifiers. Add empty columns to the right for each department you want to consolidate.
Click the first empty cell for your first department and enter =IFERROR(VLOOKUP($A2,'Department1'!$A:$C,2,FALSE),""). Adjust the sheet name ('Department1') and the column index number (2) according to where your target data lives.
Press Enter, then click and drag the fill handle at the bottom-right corner of the cell downwards to apply this formula to all rows. Repeat this process for the remaining department columns, updating the sheet names in the formula for each one.

Append and Merge Tables Using Power Query
For workbooks with vast amounts of data or tabs that change frequently, Power Query provides a dynamic and formula-free consolidation method.
Consolidate Multiple Worksheets Easily with WPS Spreadsheet
WPS Office provides full support for advanced lookup formulas like VLOOKUP, XLOOKUP, and IFERROR, allowing you to seamlessly pull and consolidate data across multiple sheets. It features a familiar interface, making data management effortless.
- 1. Open your Workbook: Launch WPS Spreadsheet and open the multi-tab workbook you want to consolidate.
- 2. Select the Target Cell: In your Master Sheet, click the cell where you want the first piece of department data to appear.
- 3. Insert the Lookup Formula: Type your VLOOKUP formula (e.g., =VLOOKUP($A2,'Department1'!$A:$C,2,FALSE)) to pull data matching the section name.
- 4. Drag to Populate: Click and hold the small square at the bottom-right of the cell, then drag downwards to instantly populate the rest of the column.

Frequently Asked Questions
Why is my VLOOKUP formula returning an #N/A error?
This error occurs if the unique identifier in your master sheet does not exactly match the text in the department sheet (such as having extra trailing spaces), or if the identifier column is not positioned as the very first column in your selected lookup range.
Can I use XLOOKUP instead of VLOOKUP to consolidate these tabs?
Yes, XLOOKUP is an excellent and more flexible alternative in modern Excel and WPS Spreadsheet. It doesn't require the lookup identifier to be in the first column, allowing you to define the lookup array and the return array entirely separately.
What should I do if my department sheet name contains spaces?
When writing your lookup formula, you must enclose any sheet names containing spaces in single quotation marks. For example, you must type 'Department 1'!$A:$C instead of Department 1!$A:$C, otherwise the formula will break.




