There are lots of pivot table macros on this blog, and some of them affect the first pivot table on the worksheet only. Other macros make changes to the selected pivot table only, based on the active cell. See how to pivot tables macros, so the macros make changes to a specific pivot table, or all the pivot tables in a worksheet or workbook.
Category: Programming
List All Pivot Field Details
Here’s another macro to help with documenting what’s in an Excel workbook. Use this macro to make a list of all the fields in a pivot table. The list includes details for each field, such as its caption and location in the pivot table layout.
List All Pivot Tables with Source or MDX
If you have multiple pivot tables and lists in an Excel file, you might need to identify which data source each pivot table uses. This macro will list all pivot tables, with source , or MDX, for OLAP-based pivot tables. Continue reading “List All Pivot Tables with Source or MDX”
Remove Pivot Fields with Macros
If you want to quickly remove all the pivot fields from one part of a pivot table, these macros will help. The sample macro below remove all the row fields, and there are more examples on my Contextures site, as well as a workbook that you can use for testing. Unlike the previous versions, these macros work with both normal pivot tables, and for OLAP-based pivot tables (Data Model).
Excel Macro Lists Pivot Table Details
If you see error messages when refreshing, this Excel macro lists pivot table details, and might help with your troubleshooting. The macro code is shown below, and there’s also a free workbook with the macro in it, that you can download.
Clean Up Pivot Table Subtotals
When there are multiple row fields in a pivot table, the outer fields automatically show subtotals. The pivot table layout can look cluttered if there are too many subtotals, especially if they are close together. Here are a couple of tips to help you clean up pivot table subtotals, to make the data easier to read.
Macro to Create a Pivot Cache List in Excel Workbook
In a large Excel file, with several pivot tables, it’s easy to lose track of how many pivot caches there are. Instead of trying to manually figure things out, use this macro to create a pivot cache list.
Continue reading “Macro to Create a Pivot Cache List in Excel Workbook”
List All Pivot Fields and Pivot Items in Excel
While you work on a big pivot table in Excel, you might need to document which fields are in the layout. To make that job easy, use this macro to list all pivot fields and pivot items in any pivot table’s row, column and filter areas. Download the free workbook, and use the macro in your own files.
Continue reading “List All Pivot Fields and Pivot Items in Excel”
Remove Pivot Fields With a Macro
Instead of manually taking fields out of a pivot table, you can remove pivot fields with a macro. The sample macro below will remove all the row fields, and there are more examples, and a free workbook, on my website.
Macro to Make a List of Pivot Tables
In a complex Excel file, you might have several lists, and multiple pivot tables based on those lists. To keep things organized, use this macro to make a list of pivot tables in the active workbook. The code is shown below, and there is also a link so you can download a free workbook with the macro.