Update all Pivots and Graphs – One Button
This code will Update all pivot tables and pivot graphs in the entire workbook, which will save time in manually updating all tables, sheets and graphs!
Open the Developer tab – Click here to see how to, we use this tab allot. – The starting point
Pop the code into a VBA Module and connect the required button to the code.
Dim i As Integer
Dim PvtTbl As pivotTable
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
n = 0
For Each PvtTbl In ws.PivotTables
n = n + 1
If n >= 1 Then
For i = 1 To n
This will refresh the tables and graphs but only if the data is in the relevant table in the workbook.
Work smart not hard!