Excel 2003 Macro problem with PivotTables - TechRepublic
Question
September 25, 2008 at 09:54 PM
o0x0o

Excel 2003 Macro problem with PivotTables

by o0x0o . Updated 17 years, 10 months ago

Hi,

I have a working macro to create a PivotTable from a large data set, but what I then need to do, is sort the data in descending order of ‘Grand Total’, and show only the top 10.

I know how to do this manually, and have tried to use the macro recorder, but the code it provides never works… It looks like it’s trying to use the .AutoShow module like this:

.AutoShow xlAutomatic, xlTop, 10, “Count of Ci – Asset”
.AutoSort xlDescending, “Count of Ci – Asset”

But I get errors when attempting to use.

Will post my full code in a reply to make it easier to read.

Thanks for any help,
Tony

This discussion is locked

All Comments