Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For the benefit of others, I worked out a solution, which is to add
the DataField first, then AutoSort and AutoShow, then add the RowField and ColumnField. My code looks like this: Set pt = ws.PivotTables("ptTest") With pt .AddDataField .PivotFields("Blah"), "Sum of Blah", xlSum With .PivotFields("CauseCatType") .AutoSort xlDescending, "Sum of Blah" .AutoShow xlAutomatic, xlTop, 8, "Sum of Blah" End With .AddFields "CauseCatType", "Category" End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autoshow whole word when typing one item in the data validation bo | Excel Worksheet Functions | |||
Building pivot tables in Excel 2007 based on existing pivot tables? | Excel Discussion (Misc queries) | |||
Top 10 autoshow in PivotTables | Excel Discussion (Misc queries) | |||
(Tom?) Pivot tables, code to refer to all pivot tables on template | Excel Programming | |||
Pivot tables-controlling user interaction with pivot tables | Excel Programming |