Hello! I am attempting to update code to refresh a pivot table if one of two cells values change. I have tried (unsuccessfully) to write an OR statement in the below. I would like to add that if the value changes in cell E6 or C32 the pivot will refresh. Any help appreciated!!!!
VBA Code:
Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Worksheets("CoExOverview").Range("C32").Address Then
ActiveSheet.Unprotect Password:="XXXXXX"
PivotTables("Summary").RefreshTable
ActiveSheet.Protect Password:="XXXXXX"
End If
End Sub