Did you have a problem where you have data spread into different sheets of a workbook and wanted to create a pivot table from multiple worksheets?
Image credit: depositphotos.com
The simplest way to create this is by appending the data from each of the sheets and pasting it one below the other and then creating a pivot table. But what if the data spans across more than 1 million rows in each sheet. It would be impossible to bring it into a single sheet. Hence we can use this technique to consolidate multiple worksheets into one PivotTable
Here we will solve this problem by keeping all the data in the sheets intact. Just by formatting and using a SQL query, we will create a Pivot Table from multiple worksheets.
I have provided the link to the workbook at the end of this article which you can download and use to understand this process in easy steps as we go along to make a pivot table across multiple sheets.
In the file, I have three sheets. The data is month-wise sample sales data.
Now if we want to create another summary sheet with Pivot Table with the source of three sheets we have to perform few steps as mentioned below.
1. Select the table in the Jan worksheet and in the name box type a name for the range. For example, here I will type - 'Jan_Data'.
2. Next click a cell in the Table and Press 'Ctrl + T' to convert the range to a Table. This will help if we add more than data in the range it would be automatically included in the named range.
3. Do steps 1 and 2 to other month sheets with names - 'Feb_Data' and 'Mar_Data'.
4. Insert a new blank worksheet and rename it - 'Summary'.
5. Save the workbook.
6. Click on Data in the ribbon and then click on the menu named 'Get Data'. Then navigate to 'From Other Sources' and finally click on 'From Microsoft Query'.