Refresh Pivot Table w/VBA upon Slicer Selection Change

lsnelley

New Member
Joined
Mar 26, 2019
Messages
1
To start with, I have a fair amount of experience in Excel, but very little to no experience with macros/VBA


Essentially, I have an excel workbook that has a pivot table connected to a data source that has lookups/matchbacks based on a separate pivot table that's controlled by a slicer. Essentially, I need to set up a VBA code that will update the particular pivot table that’s connected to the data source when my slicer updates the pivot table that adjusts the lookups/matchbacks in the data source. For additional context, the slicer controls a separate pivot table that changes the values displayed by the cells in my data source, but it does not actually change the contents of the cells. The pivot table I need to have updated displays a percentage based on whether the cells in my data source display a "1" or a "0". As it currently sits, I have to refresh the data every time the slicer is changed, and I’d like to have it update automatically every time I change the slicer.


I have searched up and down the internet for a solution, but everything I find shows a code for updating a pivot table when the data source has values that actually change, but not references that just change what the cells display.


Any help is appreciated
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,223,958
Messages
6,175,636
Members
452,662
Latest member
Aman1997

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top