Hello All,
I found on a website a VBA code about how to create a pivot table and to have the possibility to choose the function "xlDistinctCount" by adjusting the code to my need.
When executing the macro, pivot tables are well cretaed but the two first ones have their list of fields and the filters which are locked while for the one that was created last I have access to them. I made a test by deleting the two last pivot tables and I kept only the first one and the result is that finally I have access to the list of fields and the filters. Why I have access to the list of fields and the filters of the pivot table only when there is no other pivot table which follows ?
Below my code and I attached a file (you just have to execute the macro to get the final result):
Thank you.
Bookmarks