May 22, 2024


Welcome to the core

Update all Pivots and Graphs – One Button

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.

Sub RefreshButton1
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
Next i
End If
End Sub
This will refresh the tables and graphs but only if the data is in the relevant table in the workbook.
Work smart not hard!
Copyright © All rights reserved. | Newsphere by AF themes.