nniedzielski
Well-known Member
- Joined
- Jan 8, 2016
- Messages
- 598
- Office Version
- 2019
- Platform
- Windows
Hello-
Working on automating pivot table and still new to it. I recorded a macro to try and piece tings together but need some help. How can I make a selection go to the end position? When I recorded it, position was set to 7, but if there isnt 7 positions it really doesnt do anything.
this is my code:
thank you much
Working on automating pivot table and still new to it. I recorded a macro to try and piece tings together but need some help. How can I make a selection go to the end position? When I recorded it, position was set to 7, but if there isnt 7 positions it really doesnt do anything.
this is my code:
VBA Code:
ActiveSheet.PivotTables("PivotTable1").PivotFields("Age Bucket").PivotItems( _
"120+").Position = 7
ActiveSheet.PivotTables("PivotTable1").PivotFields("Age Bucket").PivotItems( _
"180+").Position = 7
thank you much