aravindhan_31
Well-known Member
- Joined
- Apr 11, 2006
- Messages
- 672
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi All, Hope are doing well
Need an help with vba for playing with Pivots .
If I Select Technical in Cell B3 and run macro, then all columns related to Technical should be visible in the below pivot (a look up table can be created like below columns Q&R.
If I have to do this now, I will have to go to the fields list select one by one. If I have to change Technical to non Technical, then I have remove one set and again add, as a user finding little difficult to do this, coz the number of columns under Technical and Non Technical are many and looking for some smart ways where User select from the dropdown and click ok, then all those relevant fields should be added in the pivot in value fields.
Attached the excel file as well for reference
In short if I can get list of columns in the slicer, that would solve this problem, however not sure if that do-able, hence looking for some solutions.
Thanks for your help.

Need an help with vba for playing with Pivots .
If I Select Technical in Cell B3 and run macro, then all columns related to Technical should be visible in the below pivot (a look up table can be created like below columns Q&R.
If I have to do this now, I will have to go to the fields list select one by one. If I have to change Technical to non Technical, then I have remove one set and again add, as a user finding little difficult to do this, coz the number of columns under Technical and Non Technical are many and looking for some smart ways where User select from the dropdown and click ok, then all those relevant fields should be added in the pivot in value fields.
Attached the excel file as well for reference
In short if I can get list of columns in the slicer, that would solve this problem, however not sure if that do-able, hence looking for some solutions.
Thanks for your help.