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.

Continue reading “Macro to Make a List of Pivot Tables”

Distinct Count in Excel Pivot Table

When you create a pivot table to summarize data, Excel automatically creates sums and counts for the fields that you add to the Values area. In addition, you might want to see a distinct count (unique count) for some fields, such as:

  • The number of distinct salespeople who made sales in each region
  • The count of unique products that were sold in each store

Continue reading “Distinct Count in Excel Pivot Table”

Unpivot Excel Data With a Macro

If you plan to build a pivot table, check the source data first, to make sure you have it set up correctly. If there is a heading for each month’s sales, instead of just one column where all the amounts are stored, that won’t work well in a pivot table. You need to “unpivot” your data first, and you can unpivot Excel data with a macro.

Continue reading “Unpivot Excel Data With a Macro”

Remove Sum Of From Pivot Table With Macro

When you put value fields into a pivot table, it automatically adds  text to the headings, such as “Sum of Quantity”, if the field name is Quantity. You can manually change those headings, to remove the extra text, if there are only a few of them. If there are lots of fields to change, it’s quicker to remove that text with a macro.

Continue reading “Remove Sum Of From Pivot Table With Macro”

Show Tenths of Second in Pivot Table Times

If you try to show hundredths of second, or tenths of second in pivot table, you might have trouble. Usually, the times are rounded, and there is a zero, instead of numbers, for the tenths and hundredths.

See how to fix that pivot table time problem, so that the numbers are displayed correctly.

Continue reading “Show Tenths of Second in Pivot Table Times”

Pivot Table Top 10 Filter From Worksheet Values

Top 10 Filters are a quick and easy way to focus on key items in a pivot table. Instead of looking at all the data, hide everything except a set number of top or bottom items.

In the screen shot below, you can see the Pivot Table Top 10 Filter dialog box. There are four drop down lists, where you can change the settings, but Excel won’t let you link to a worksheet cell, like it does in some dialog boxes.

Continue reading “Pivot Table Top 10 Filter From Worksheet Values”