Beruflich Dokumente
Kultur Dokumente
To create a Pivot Table, you can use data from different sheets in a workbook, or from different workbooks, if those tables have identical column structures.
However, you won't get the same pivot table layout that you'd get from a single range.
If possible, move your data to a single worksheet, or store it in a database, such as Microsoft Access, and you'll have more flexibility in creating the pivot table. If combining your data isn't an option, this pivot table tutorial explains the steps to create a pivot table from multiple consolidation ranges, describes the limitations, and suggests workaround solutions.
3. Select one of the page options, click Next 4. Select each range, and click Add 5. If you chose 'I will create the page fields', you can select each range, and assign field names, in step 2b 6. Click Next
7. Select a location for the PivotTable, then click Finish 8. In the Column dropdown, hide any columns that contain meaningless data. For example, the Colour column might contain all zeros, because the colours are text, not numbers.
You can change the function (e.g. SUM) that is being used by the data
value, but it will use the same function on all these columns. The Pivot Table contains some meaningless data, such as sum of Date and columns full of zeros where the database columns contain text. To get the best results, rearrange your database columns, so the most important column is at the far left. That column of data will become the Row values in the pivot table. If there are columns that you don't want in the pivot table, move those to the far right in the source data. Then, do not include those columns when selecting the data ranges for the pivot table.
Then, use the Union query result as the pivot table's source data.
With this solution, youll end up with a normal pivot table, with none of the limitations. However, its a bit tedious to set up, especi ally if you have more than a couple of tables.
sample file from Excel MVPs, Kirill Lapin (KL), with amendments by Hctor Miguel Orozco Diaz. Before you use the sample code, replace the sample sheet names with the sheet names in your workbook. For example, if your sheet names are "East" and "West", change this line of code: arrSheets = Array ("Ontario", "Alberta") to this arrSheets = Array ("East", "West")
In the code, you can also change the location where the pivot table will be added. In the sample file, the TableDestination is set for the active sheet, in range A1.
Then, after you make those small changes, click the button on the worksheet, and a summary pivot table is automatically created. To download the sample file from Kirill and Hctor, click here: Pivot Table From Multiple Sheets.