SOLVED

Set Auto Refresh to Pivot Table as Source Data Changes

Copper Contributor

Overview:

1. Have a Master table where Cost per Month Per Item is added. 

2. Using this Master table, have created a Pivot tables where i create new views about the data like Cost per Category

 

Problem Statement

each time i change the Master Table, I need to manually right click and refresh the Pivot table so that the corresponding tables have accurate data

 

Question

How do i have a Refresh Button added that i can Anyone in the team to click if they change the Master table? or Auto Refresh Pivot table when Master table data is changed?

2 Replies
best response confirmed by ratishkp (Copper Contributor)
Solution

@ratishkp You can assign this to a shape or button:

 

Sub foo()

  ActiveWorkbook.RefreshAll

End Sub

 

Or if the PivotTable is on another sheet, you can add ActiveWorbook.RefreshAll to the Worksheet_Activate event, and it will automatically update whenever the sheet is selected.

Thank you @Smitty Smith ! that worked!

1 best response

Accepted Solutions
best response confirmed by ratishkp (Copper Contributor)
Solution

@ratishkp You can assign this to a shape or button:

 

Sub foo()

  ActiveWorkbook.RefreshAll

End Sub

 

Or if the PivotTable is on another sheet, you can add ActiveWorbook.RefreshAll to the Worksheet_Activate event, and it will automatically update whenever the sheet is selected.

View solution in original post