How to Make a Pivot Table From Multiple Sheets in Excel
By ExcelReady TeamUpdated 5 min read
The short answer
A PivotTable reads one source, so bring the sheets together first. If they share the same columns, such as one sheet per month, append them with Power Query and pivot the result. If they hold different but related data, such as sales and a product list, add both to the Data Model and link them with a relationship.
Key takeaways
- A normal PivotTable uses one range. To use several sheets, combine them first or link them in the Data Model.
- Same columns on every sheet: append them with Power Query, then pivot the result.
- Different but related tables: add them to the Data Model and create a relationship on a shared ID.
- Format each sheet's data as an Excel table first so new rows are picked up on refresh.
- The old PivotTable Wizard can consolidate ranges, but it gives a very limited pivot.
On this page+
To build a pivot table from multiple sheets, you first give the PivotTable one source to read. There are two good ways: append sheets with the same columns into one table using Power Query, or load different but related tables into the Data Model and connect them. This guide shows both, step by step, and helps you pick the right one for your data.
Which method should you use?#
The right method depends on what your sheets look like. Ask one question: do the sheets have the same columns?
| Your sheets look like… | Example | Use |
|---|---|---|
| Same columns, different rows | One sheet per month or per store | Power Query append, then a PivotTable |
| Different columns, linked by an ID | Sales sheet + Products sheet | Data Model with a relationship |
| You only need totals by label | Budget sheets with the same row labels | Consolidate (see below) |
Most people with "one sheet per month" data need the first method. If you only need a total by matching labels and don't need a pivot, the guide to combining data from multiple sheets covers Consolidate, VSTACK and copy-paste.
Before you start: turn each sheet into a table#
Excel tables make both methods more reliable, because a table grows when you add rows. Do this on every sheet:
- Click inside the data.
- Press Ctrl+T (Mac: ⌘T) and confirm that My table has headers is ticked.
- On the Table Design tab, give it a clear name, such as
Sales_Jan.
Check that the headers match exactly across sheets. "Sales" on one sheet and "Sales Amount" on another will not line up. Also remove blank rows and subtotal rows inside the data.
Method 1: Append the sheets with Power Query, then pivot#
Power Query is Excel's tool for importing and reshaping data in steps that you can refresh. Appending stacks tables on top of each other, so three monthly tables become one long table. It is available in Excel 2016 and later on Windows and in recent Microsoft 365 versions for Mac. For a first look at the tool, see Power Query for beginners.
Step 1: Load each table as a query#
- Click inside the first table and go to Data > From Table/Range.
- The Power Query Editor opens. Choose Close & Load > Close & Load To…
- Pick Only Create Connection and click OK.
- Repeat for each sheet's table.
Step 2: Add a column that says where each row came from#
If the tables don't already have a Month or Store column, you lose that detail when you stack them. In each query, use Add Column > Custom Column and type a fixed value, such as "Jan". Or add the column in the source tables before you start.
Step 3: Append and build the PivotTable#
- Go to Data > Get Data > Combine Queries > Append.
- Choose Three or more tables, and add every monthly query.
- Click OK, check the preview, then choose Close & Load To…
- Pick PivotTable Report and click OK.
You now have one PivotTable built from every sheet. Drag Region to Rows, Month to Columns and Sales to Values. With the exercise data, North shows 12,700: 4,200 in January, 3,900 in February and 4,600 in March.
Method 2: Use the Data Model for related tables#
The Data Model is a store inside the workbook that holds several tables and the links between them. Use it when your sheets hold different information that shares an ID, such as a Sales sheet with a ProductID column and a Products sheet with ProductID and Category.
- Format both sheets as tables, as above.
- Click inside the Sales table and go to Insert > PivotTable.
- Tick Add this data to the Data Model, and click OK.
- In the PivotTable Fields pane, click All to see every table in the workbook.
- Drag Category from Products to Rows, and Revenue from Sales to Values.
- If Excel says a relationship may be needed, click Create. Set Sales → ProductID as the column and Products → ProductID as the related column.
You can also set relationships first, under Data > Relationships. The lookup table (Products) must have each ID only once, or the relationship fails.
Data Model features, including relationships, are most complete in Excel for Windows. If you don't see these options on a Mac, use Method 1 instead.
Method 3: The old PivotTable Wizard#
On Windows, Excel still has the legacy PivotTable and PivotChart Wizard. Press Alt, then D, then P (one after another) to open it, and choose Multiple consolidation ranges.
It works, but the result is very limited. You only get generic fields called Row, Column, Value and Page1, and you can't use your own column names as separate fields. Use it only for a quick cross-tab of totals. For anything you'll reuse, Methods 1 and 2 are far better.
Keep it up to date: refresh#
PivotTables don't update on their own. When someone adds rows to a monthly sheet, go to Data > Refresh All (Windows: Ctrl+Alt+F5). This reruns the Power Query append and then refreshes the pivot.
If you add a new sheet, such as April, make it a table, load it as a connection, and add it to the append query with Home > Append Queries in the Power Query Editor. The guide on how to refresh a pivot table covers refresh settings, including refreshing when the file opens.
Common problems and fixes#
These are the issues people hit most often:
- Extra columns full of blanks: headers don't match exactly. Rename them in the source tables and refresh.
- Totals look too low: some numbers are stored as text. In Power Query, set the column type to a number.
- "(blank)" in the pivot: there are blank rows in a source table. Delete them or filter them out in Power Query.
- Relationship error in the Data Model: the lookup table has duplicate IDs. Remove the duplicates first.
- Missing month: the new sheet was never added to the append.
When a formula is enough#
If you only need a few totals, a formula can be faster than a pivot. A 3D reference such as =SUM(Jan:Mar!C2) adds the same cell on every sheet between Jan and Mar; see how to sum across sheets. On a combined table, SUMIFS gives any total you need, like the exercise on this page. The cross-sheet references lesson practises pointing formulas at other tabs.
New to pivots? Start with the beginner's pivot table guide before you combine sheets.
Practise it#
Try the exercise on this page: SUMIFS gives the same North total the pivot should show, which is a quick way to check your combined data. Then practise advanced PivotTables in a live spreadsheet, where you nest fields, add filters and update the source when new rows arrive. The lesson checks each step instantly.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
These rows were appended from the Jan, Feb and Mar sheets. In F2, use SUMIFS to total the Sales (C2:C8) for the North region (B2:B8). This is the number your PivotTable should show for North.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Sales | ||||||
| 2 | North total | ||||||
| 3 | |||||||
| 4 | |||||||
| 5 | |||||||
| 6 | |||||||
| 7 | |||||||
| 8 | |||||||
| 9 | |||||||
| 10 | |||||||
| 11 |
Tip: SUMIFS starts with the range to add (C2:C8), then the range to check (B2:B8) and the value to match in quotes.
Practise this in a lesson
Frequently asked questions
Can a pivot table pull data from multiple sheets?
Not from several ordinary ranges at once. Either combine the sheets into one table first, usually with Power Query, or add the tables to the Data Model and connect them with relationships.
How do I combine multiple sheets into one pivot table without Power Query?
You can copy the sheets into one table and add a column that says which sheet each row came from. On Windows, the old PivotTable Wizard (Alt, D, P) also has a multiple consolidation ranges option, but the pivot it makes is very limited.
What is the Data Model in Excel?
The Data Model is a store inside the workbook that holds several tables and the relationships between them. A PivotTable built on it can use fields from all of those tables at once.
Why doesn't my pivot table show new data from the other sheets?
PivotTables don't update by themselves. Use Data > Refresh All so the Power Query append runs again and the pivot reads the new rows. If you added a whole new sheet, add its table to the append query too.
Do the sheets need the same column headers?
For appending, yes. Power Query lines columns up by header name, so Sales and Sales Amount would become two separate columns with blanks. Rename headers so they match before you append.