To add the code click on the sheet's tab and "view code".
In the window click the left dropdown at the top and select worksheet, then the right dropdown and select " Activate".
Then paste the code and save. Whenevre the window is activated the PT will refresh.
Be certain to give the correct Pivot Table name instead of " MyPivot".As for the dynamic range, declare your range as a table and use the table as data source.
( Hope all that is correct I'm no good at VBA)
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
|