Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba pivot table sorting
is it possible to sort by the grand total column in a pivot table using vba?
what is the proper code to do so? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba pivot table sorting
Turn on the macro recorder, then go through the steps of building your pivot
table. After you build your pivot table, double-click on the 'pivot' in the upper left corner of the pivot table. A screen pops up; click on 'Advanced' then choose your 'AutoSort Options'. After you do all that, go back and check your code. You syntax will be different from mine, but eventually, you should probably get code somewhat similar to this: ActiveSheet.PivotTables("PivotTable1").PivotFields (Sheets("Summary").Range("C5").Value).AutoSort _ xlDescending, "Count of " Just try it and see what happens. You may be pleasantly surprised!! Regards, Ryan--- -- RyGuy "joemeshuggah" wrote: is it possible to sort by the grand total column in a pivot table using vba? what is the proper code to do so? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sorting & pivot table | Excel Worksheet Functions | |||
Sorting in Pivot Table | Excel Worksheet Functions | |||
Pivot table not sorting | Excel Discussion (Misc queries) | |||
Pivot Table Sorting | Excel Worksheet Functions | |||
Pivot Table Sorting | Excel Programming |