BrianExcel
Well-known Member
- Joined
- Apr 21, 2010
- Messages
- 975
When I create a Pivot Table and add the date values as the table rows, it automatically groups into "months" as a separate row field instead of doing it by day. I can then manually remove months and it lists correctly, but why is it adding months and how do I get that changed?
In the VBA code the field is listed as
And then the next line of code (removing month) is
In the VBA code the field is listed as
Code:
.PivotFields("Date").AutoGroup
And then the next line of code (removing month) is
VBA Code:
ActiveSheet.PivotTables("PivotTable9").PivotFields("Months").Orientation = xlHidden