JoelS
03-18-2009, 11:43 AM
I need to hide a subtotal (data) row in a pivot table when the PivotField is selected. I have three data fields (sales, trans, avg) and when I use subtotals for the PivotField (location), I get three subtotals but only want subtotals for sales and trans. Below is the VBA code that provides the subtotals for each location and shows all three data fields for each location.
ActiveSheet.PivotTables("CompanySales"). _
PivotFields("Location").Subtotals(2) = True
This is my first post and would appreciate any help.
Thanks
Joel
ActiveSheet.PivotTables("CompanySales"). _
PivotFields("Location").Subtotals(2) = True
This is my first post and would appreciate any help.
Thanks
Joel