Excel Macro Lists All Pivot Tables and Pivot Fields

If you have a big Excel file, with lots of pivot tables, you might want to document everything that’s in the workbook. Maybe you inherited the workbook, and you’re not sure what’s in it. Or perhaps it’s a file that you only use occasionally, and it’s hard to remember what it contains. To get the details quickly, use the code shown below. This Excel macro lists all pivot tables and pivot fields in the active workbook.

Continue reading “Excel Macro Lists All Pivot Tables and Pivot Fields”

Fix Old Items in Excel Pivot Table Lists

If you remove items from a pivot table’s source data, those items might still appear in the pivot table drop down lists, even after you refresh the pivot table. Here’s how you can stop those old items from appearing – watch the short video, or read the written steps below.

Continue reading “Fix Old Items in Excel Pivot Table Lists”

Excel Pivot Table Sorting Macro Data Model

When you add fields to the pivot table row area, you can sort the items alphabetically, or by the numbers in the Values area. The sorting can be done manually or with a macro. See below for an Excel pivot table sorting macro. Data Model pivot tables can be sorted with it too.

Continue reading “Excel Pivot Table Sorting Macro Data Model”

Unpivot Excel Data With Get & Transform

If you want to build a flexible pivot table, you might need to rearrange your source data, before you start. For example, if there is a separate column for each month’s sales, you should “unpivot” the data, to get all the amounts in one column. The good news is that you unpivot Excel data with Get & Transform, and your original data isn’t changed. If you don’t have G&T, there’s a macro that you can use instead

Continue reading “Unpivot Excel Data With Get & Transform”

Excel Pivot Table Error Cannot Group That Selection

When you try to group dates in an Excel  pivot table, or other pivot table items, you might get a pivot table error, “Cannot group that selection.” In Excel 2010, and earlier versions, that error was usually caused by blank cells in your source data, or text in the number or date columns. If you’re using Excel 2013 or later, there’s another reason that might prevent you from grouping pivot table items. Continue reading “Excel Pivot Table Error Cannot Group That Selection”

Show Distinct Count in Data Model Pivot Tables

In a pivot table you might want to see a distinct count (unique count) for some of the data, instead of an overall count.

For example, if pens and binders are sold in different colours, how many unique colours were sold for each product? Here’s how to show a distinct count in Data Model pivot tables.

Continue reading “Show Distinct Count in Data Model Pivot Tables”

Stop Pivot Table Date Grouping

When you add a date field to your Pivot Table, Excel automatically groups the dates into a hierarchy, such as years and months.

dates grouped in pivot table filter list
dates grouped in pivot table filter list

See how to stop pivot table date grouping in the latest versions of Excel, and a couple of workarounds for Excel 2016. You can also read about why this feature was added, and watch a date grouping video.
Continue reading “Stop Pivot Table Date Grouping”