Category Archives: Programming

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 … Continue reading

Posted in Programming | Leave a comment

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.

Posted in Programming | Leave a comment

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 … Continue reading

Posted in Programming | Leave a comment

Use Sample Pivot Table VBA Code

In some of the pivot table articles that I post here, there is sample code that you can use in your own files. Sometimes I show the code sample here, and you can copy and paste it into your workbooks. … Continue reading

Posted in Programming | 1 Comment

Change Selected Pivot Fields to SUM

When you create a pivot table, Excel automatically makes the value fields either a SUM or a COUNT, depending on the type of data in that field. You’re not stuck with that function though — if you don’t like the … Continue reading

Posted in Programming | Leave a comment

Create Fake Hyperlinks in Excel Pivot Table

Unfortunately, you can’t add hyperlinks to a pivot table, even if there are hyperlinks in the pivot table’s source data. In the screen shot below, the Hyperlink command is not available, because a pivot table cell is selected. Use Programming … Continue reading

Posted in Programming | 1 Comment

Remove Pivot Table Filters with VBA

One of the advantages of summarizing your data in a pivot table is that you can filter the results, to focus on specific items. There are 3 types of filters available, and you can see them in the screen shot … Continue reading

Posted in Programming | Leave a comment

Add All Remaining Fields to Pivot Table

After you create a pivot table, you can add or remove fields by using the check boxes in the field list. Text fields are automatically added to the Row Labels area, and numeric fields go into the Values area. Once … Continue reading

Posted in Programming | 1 Comment

Prevent Changes to Pivot Table Setup

After you set up a pivot table, you might want to prevent other people from making changes to the way that it is set up. With a bit of programming, you can restrict what happens to a pivot table. Usually, … Continue reading

Posted in Programming | 4 Comments

Scroll Through Report Filter Items

In Excel 2010, slicers were added to Excel, and they make it easy to select one or more items in a pivot table’s Report Filter. If you have an older version of Excel, or if you don’t have room for … Continue reading

Posted in Programming | Leave a comment