Get the Multi-Sheet PivotTable Workbook
Practice all 4 methods from this tutorial: Power Query, Data Model relationships, PIVOTBY + VSTACK, and building a PivotTable with Copilot.
How Do You Combine Multiple Sheets into One PivotTable Using Power Query?
Our first example takes two tables of sales data and appends (or stacks) them into a single table. This newly stacked table will act as a feeder dataset for a Pivot Table.
The trick is to keep the original tables separate while at the same time not physically creating the feeder table. We want the appended results to be fed directly to the Pivot Table for reporting.

Bringing in the Two Data Sets
The first data set is for Store 1 and appears as follows.

We see the Transaction Number in the 1st column and the Sales Amount in the 5th column.
The second data set is for Store 2 and appears as follows.

Notice that the Transaction Number in the 2nd column and the Sales Amount in the 4th column.
This won’t be a problem because our tool of choice will rearrange the data based on column names before sending it to the feeder table.
Meet your new best friend, Power Query
Power Query is a built-in Excel tool used to transform data that would otherwise be unusable into perfectly usable data.
Although not required, Power Query works more efficiently if the source data is in a proper Excel Table format.
To convert our two existing “plain” tables into proper Excel Tables, click anywhere in the first table (Data Store 1) and press CTRL-T on the keyboard. A Create Table dialog box will appear. Click OK to select the defaults.

On the Table Design ribbon, click in the Table Name field (far left side of the ribbon) and rename the table “TableStore1” (no spaces).

Repeat the above process for the second table (Data Store 2) and rename the upgraded table “TableStore2” (no spaces).
Featured Bundle
Power Pro Bundle
Using Power Query to “stack” the two data sets
Next, we bring the two tables into Power Query.
Power Query will be used to append (i.e., “stack”) the two tables into a single table.
A great feature of the Append process is that the column’s order in the tables does not need to be identical. Power Query will automatically rearrange the column order of each table to align into a single table.
Because we need to remember which transactions are sourced to which store, we will add a “helper column” that contains the store’s number next to each related transaction.
Step 1: Bring the first table into Power Query
Click anywhere in the first table (“TableStore1”) and select Data (tab) -> Get & Transform Data (group) -> From Sheet (formerly named “Table/Range”).

A new window will open showing the Power Query Editor.

One small adjustment to this data would be to discard the time information in the “Date” column.
This is easily done by selecting the “Date” column header then click “Data Type: Date/Time” from the Home ribbon and change the data type to “Date”.

Click “Replace Current” in the message that follows. This will update the existing data typing step instead of creating a whole new step for this similar transformation.
Step 2: Add tracking information for each transaction
To not lose focus of which transactions came from which stores, we will add a column to the table that has the store number attached to each transaction.
On the Add Column ribbon, click Custom Column (far left of ribbon).

In the Custom Column dialog box, give the new column the name “Store” and enter the following formula in the larger formula field.

The result is a new column (far right of the table) that displays “Store 1” for each transaction.

As with the “Date” column, change the data type for the newly added “Store” column to a TEXT data type.

Step 3: Bring the second table into Power Query
We can save a few steps here by making a copy of the “TableStore1” query and making a few targeted changes.
Featured Course
Master Excel Power Query – Beginner to Pro

If you click on the SOURCE step in the “Applied Steps” panel (right of editor window) you can see the reference to the “TableStore1” table.

We will make a copy of this query and change the SOURCE step’s pointer from “TableStore1” to “TableStore2”.
In the Queries panel (left of editor window), right-click the “TableStore1” query and select Duplicate.

Rename the duplicate query from “TableStore1 (2)” to “TableStore2”.

Select the SOURCE step in the “Applied Steps” panel.
In the Formula Bar, change the entry from “TableStore1” to “TableStore2” and press ENTER to commit the change.

Don’t forget to update the “Added Custom” step at the bottom of the Applied Steps panel to use the label “Store 2” in the “Store” column.

Step 4: Close the Queries
Because these two queries will ultimately send their results to a 3rd “stacked” query, we will finish their creation process by loading them to Excel.
Because we don’t wish to create actual output tables of these two queries, on the Home ribbon, click the lower part of the “Close & Load” button and select “Close & Load to…”

In the Import Data dialog box, select the option labeled “Only Create Connection” and click OK.

You will now see two queries on the right side of the screen in the Queries & Connections panel.

Step 5: Append/Stack the Tables into a Single Table
To append the two tables into a single table which will be used to drive the Pivot Table, click Data (tab) -> Get & Transform Data (group) -> Get Data -> Combine Queries -> Append.

In the Append dialog box, select the “Two Tables” option, then select each table from the two supplied dropdown fields. Click OK when complete.

Back in the Power Query Editor, you will see a newly created query named “Append1” with the results of the two previous query’s tables stacked to form a single unified table.
Note how we can keep track of which store each transaction came from by using the created “Store” column.

Step 6: Rename the appended query and output to an Excel Table
Let rename the appended results query to “AllStores”, then click the lower part of the “Close & Load” button and choose “Close & Load…”
In the Import Data dialog box, select Table and New Worksheet as the destination options and click OK.

The result is an Excel Table with the appended results.

How Do You Create a PivotTable from the Appended Power Query Data?
To create a Pivot Table from the appended tables, perform one of the following actions:
- Right-click the “AllStores” query in the Queries & Connections panel (right) and select “Load to…” In the Import Data dialog box, select Pivot Table Report and New Worksheet as the destination options and click OK.

…or…
- Click in the table of results and select Insert (tab) -> Tables (group) -> PivotTable.

You can now create a Pivot Table to answer your business-related questions, such as, “What were the total sales by store along with the percentages of total sales?”

How Do You Connect Two Excel Tables Using a Data Model Relationship?
In this example, we want to leave the tables in their original structures but connect them in such a way that they “talk” to one another.
Our first table named “TableData” has transactional information.

Our second table named “TableMaster” has descriptive information about each product in our store catalog.

Traditionally, any column in the catalog table that needs to be reported on against the “Data” table (ex: “Total sales by Department”) would need to be brought over from the catalog table to the transaction table using a function like VLOOKUP or a formula that used INDEX & MATCH.
This would create a single, large table.
What we will do is connect these two tables using what is known as a Relationship.
What is a Relationship?
A Relationship is where you select a column from each table that has identical information.
Featured Course
Excel Data Modeling with Power Pivot & DAX

For example, we have a “ProductCode” column in the “TableData” table. This lists the item sold.
We are likely to see many repeats of the same product codes as we hope to sell many of the same items throughout the reporting period.

In the “TableMaster” table, we have an entry for each of the product codes along with descriptive information about each product.
The catalog of products should only have one entry for each product.

Connecting the Tables (i.e., creating the Relationship)
To connect the two tables by way of the ProductCode column, perform the following steps:
- Select Data (tab) -> Data Tools (group) -> Relationships.

- In the Manage Relationships dialog box, click “New…”

- In the Create Relationship dialog box, select the two tables using the left-side dropdowns and the “ProductCode” column using both right-side dropdowns. Click OK when finished.

You now have a connection between each table that serves as a live communications path between the tables.

Click the “Close” button to close the Manage Relationships dialog box.
This relationship adds the two related tables to what is known as the Data Model. Think of it as a back-end database of all related tables.

Featured Course
Excel Essentials for the Real World

How Do You Create a PivotTable from Related Tables in the Data Model?
To create a Pivot Table from the two related tables, select Insert (tab) -> Tables (group) -> Pivot Table (dropdown arrow) -> From Data Model.

Place the Pivot Table on a new sheet.

Populate the Pivot Table as needed to answer the applicable business questions.

Should You Use Power Query Append or Data Model Relationships?
Neither one of these approaches is better than the other when discussing technique. However, each approach brings to the table a series of pros and cons.
Selecting the “correct” approach depends on how the data is structured, what you want to create, your comfort level with Power Query and/or Relationships.
It’s up to you to decide the method you prefer when dealing with your data.
Knowing and becoming proficient in both methods will serve you well in the long run.
How Can You Use PIVOTBY and VSTACK to Summarize Multiple Sheets Without a PivotTable?
The PIVOTBY function combined with VSTACK lets you summarize data from multiple sheets in a single formula, without creating a PivotTable at all. PIVOTBY groups your data along rows and columns and aggregates values (sums, averages, counts), while VSTACK stacks the ranges from different sheets into one vertical array. The result is a fully dynamic summary that updates instantly when source data changes. No refresh button needed.
PIVOTBY is available in Excel for Microsoft 365 (Windows and Mac), Excel 2024 (Windows and Mac), and Excel 2021 (Windows and Mac). VSTACK is available in Excel for Microsoft 365 and Excel for the web. Both functions require dynamic array support.
Note: PIVOTBY produces output that looks similar to a PivotTable, but it is a formula, not a PivotTable feature. You cannot add slicers, drill down into rows, or use PivotChart with it.
How the Formula Works
Suppose you have two sheets, Store1 and Store2, each with sales data in the same column layout: Product in column A, Region in column B, and Amount in column C. You want a summary of total sales by Product (rows) and Region (columns) across both stores.
Enter this formula in a blank cell on a new sheet:
=PIVOTBY( VSTACK(Store1!A2:A100, Store2!A2:A100), VSTACK(Store1!B2:B100, Store2!B2:B100), VSTACK(Store1!C2:C100, Store2!C2:C100), SUM )Here is what each part does:
- VSTACK(Store1!A2:A100, Store2!A2:A100) stacks the Product column from both sheets into a single array. This becomes the row_fields argument.
- VSTACK(Store1!B2:B100, Store2!B2:B100) stacks the Region column. This becomes the col_fields argument.
- VSTACK(Store1!C2:C100, Store2!C2:C100) stacks the Amount column. This is the values argument.
- SUM is the aggregation function. You can also use AVERAGE, COUNT, MAX, MIN, or a custom LAMBDA.
The formula spills a complete summary grid into the surrounding cells. If you add data to either sheet, the results update automatically.
When to Use PIVOTBY + VSTACK Instead of a PivotTable
This approach works best when you want a quick, formula-based summary that stays embedded in your worksheet, updates without refreshing, and does not need interactive features like slicers, timelines, or drill-down.
Traditional PivotTables are still the better choice when you need drag-and-drop field rearrangement, expandable hierarchies, PivotCharts, or when colleagues who don’t have Microsoft 365 or Excel 2024 need to open the file.
For a deeper look at the VSTACK function, see this tutorial on VSTACK.
How Can Copilot in Excel Build a PivotTable from Multiple Sheets?
If you have a Microsoft 365 subscription with Copilot access, you can ask Copilot to create a PivotTable from multiple sheets using plain language. Instead of navigating ribbon menus and dialog boxes, you type a prompt describing the summary you want, and Copilot handles the table setup, field placement, and output.
This feature is called Edit with Copilot. Microsoft previously marketed it as “Agent Mode,” but as of early 2026 the branding has been simplified. The editing capability is now the default behavior when you open the Copilot pane in Excel.
What You Need Before Starting
Subscription: Edit with Copilot requires a Microsoft 365 Personal, Family, or Premium subscription (with AI credits), a commercial Microsoft 365 Copilot subscription, or a Copilot Chat-eligible business/enterprise plan.
File format: Your workbook must be an .xlsx file saved to OneDrive or SharePoint. AutoSave must be turned on in the desktop app.
Data format: Each sheet’s data should be formatted as an Excel Table (select any cell in the range and press CTRL+T). Copilot works better with properly structured tables that have clear column headers and no blank rows.
How to Use Copilot to Create the PivotTable
- Step 1: Open your workbook in Excel for the web or the Microsoft 365 desktop app.
- Step 2: Select Home > Copilot to open the Copilot pane on the right side of the screen.
- Step 3: When the pane opens, editing is on by default. You will see the Excel selector in the chat box, which confirms Copilot can make changes to your workbook.
- Step 4: Type a prompt that describes what you want. Be specific about which data and which summary. For example:
"Create a PivotTable that summarizes total sales by product and store, using the data tables on the Store1 and Store2 sheets. Place it on a new sheet."- Step 5: Copilot will analyze your data, build a step-by-step plan in the pane, and make changes directly in your workbook. You can watch the reasoning in real time. For complex requests, this may take a few minutes.
- Step 6: Review the result. If the PivotTable needs adjustments, type a follow-up prompt like “Add a slicer for Region” or “Change the aggregation to AVERAGE.”
You stay in control of every change. Use Ctrl+Z to undo any step, or access version history to revert to an earlier state.
When to Use Copilot vs. Manual Methods
Copilot is fastest when you know what summary you want but don’t want to set up the mechanics yourself. It is especially useful for multi-step tasks like reshaping data across sheets and building a report with charts and PivotTables in one pass.
Use the manual methods covered earlier in this tutorial (Power Query or Data Model Relationships) when you need full control over each transformation step, when you are working offline, or when your organization does not have Copilot access.
Download the Practice Workbook
Practice all 4 methods from this tutorial with the exact workbook from the video.
Leila Gharani
Founder of XelPlus and ten-time Microsoft MVP. Leila helps over 500,000 professionals master Excel, Power BI, and data automation through practical, real-world training.









