I have this VBA code in the module:
Sub Search()
With Sheets("sPCE")
Set critRng = [Criteria] 'search base on date range
Sheets("PCE").Range("A5:T1050").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=critRng, CopyToRange:=.Range("E17:O17"), Unique:=False
End With
Range("B17:O2000").Font.Name = "Calibri" 'set the font type and size
Range("B17:O2000").Font.Size = 9
ThisWorkbook.RefreshAll
End Sub
When the search button was clicked, the Excel data will be updated and the Pivot Chart created using this data range will auto-updated as well.
But "ThisWorkbook.RefreshAll" will update my other Pivot Chart in other sheets which I want to avoid.
Bookmarks