Friday, June 27, 2014

How to Refresh a Pivot Table with Excel VBA Macro

Macro to Refresh a Pivot Table existed at a Dynamic Active Cell
'A Simple macro to refresh a Pivot Table whose name not know in advance , by Dynamically based on Active Cell
Sub Pvt_Refresh()

ActiveSheet.Range("I4").Select
Pivot_Name = Selection.PivotTable.Name

ActiveSheet.PivotTables(Pivot_Name).PivotCache.Refresh
'ActiveWorkbook.RefreshAll [ To Refresh all Pivots Data  in a WorkBook ]
End Sub





Thanks.,TAMATAM

No comments:

Post a Comment

Hi User, Thank You for visiting My Blog. Please post your genuine Feedback or comments only related to this Blog Posts. Please do not post any Spam comments or Advertising kind of comments which will be Ignored.

Featured Post from this Blog

How to compare Current Snapshot Data with Previous Snapshot in Power BI

How to Dynamically compare two Snapshots Data in Power BI Scenario: Suppose, we have a sample Sales data, which is stored with Monthly Snaps...

Popular Posts from this Blog