pliskers
Active Member
- Joined
- Sep 26, 2002
- Messages
- 462
- Office Version
- 2016
- Platform
- Windows
I have a data set against which I've built a pivot table, and within the data set are separate columns with values of sales numbers for the Current Month, Fiscal Year To Date, Last 3 Months, etc. I would like to build a chart that will reflect the user's selection of the time period they would like to see. In essence, then, I need some code that would perform the function of swapping out one Value field in the pivot table for another, depending on the Period that the user would choose via a slicer.
I've seen details of how to modify the Rows via macro, but nothing regarding the modifying of the Value field selection via VBA. Can this be done? A sample of some code would be much appreciated!
Thank you all in advance.
I've seen details of how to modify the Rows via macro, but nothing regarding the modifying of the Value field selection via VBA. Can this be done? A sample of some code would be much appreciated!
Thank you all in advance.