I'm trying to modify data in a cell range when changing the selection in a slicer. Can this be done in Excel for Mac?
Asked
Active
Viewed 4,483 times
0
-
1Probably. Did you try [this](https://stackoverflow.com/questions/10800134/how-to-run-a-macro-automatically-when-the-selections-of-pivot-tables-are-changed)? – BigBen Jul 27 '20 at 16:43
1 Answers
2
Yes, it is! As @BigBen had already mentioned, it is possible via the event Worksheet_PivotTableUpdate. This is also supported by Excel for Mac.
Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
End Sub
It is important that the code is defined in the corresponding sheet module

Holger
- 320
- 1
- 10
-
This only works for pivot table slicers, it does not work for Table slicers unfortunatelly. – Dumitru Daniel May 11 '22 at 15:31