How To Refresh All Pivot Tables at Once in Excel

Search
Generic filters

Table of Contents

Believe me, if you are able to refresh all the pivot tables at once it can save a lot of your time. Yes, that’s right. Just think like this. Suppose, you have 10 pivot tables and to refresh a single pivot table it takes one sec.

10 Pivots = 10 Seconds

Just like you can automate to create a pivot table there are few ways that you can use it to automatically refresh it as well. In this post, We will share with you 3-simple ways which you can use it to refresh all the pivot tables in single click.

You can use “Refresh All” Button to Update all the Pivot Tables in the Workbook

The “Refresh All” button is a simple and easy way to refresh all the pivot tables in a workbook with a single click.

Refresh All Pivot Tables Manually With Single Click

All you need to do it is Go to Data Tab ➜ Connections ➜ Refresh All.

Another Way is Automatically Refresh All the Pivots When You Open a Workbook

In case you want to refresh all pivot tables on opening a workbook you can use following steps to make one time to set up for that.

Refresh All Pivot Tables On Opening A File
 

Below steps you can use it to make all the pivot tables auto refresh while opening a workbook.

  1. Select any of the pivot tables from your workbook.
  2. Right click on it and select “PivotTable Options”.
  3. Go To Data Tab ➜ Tick Mark “Refresh Data When Opening A File”.
  4. Click OK.

VBA Code (MACRO) to Update All the Pivot Tables in a Single Click

Yes, you can use VBA code as well to refresh all pivot tables. All you have to do is just use below-mentioned code.

Sub RefreshCustomPivotTable()

With ActiveSheet
.PivotTables.RefreshTable
End With

End Sub

Above code will refresh all the pivot tables from your active worksheet and you can also assign this macro to a button to use in a single click.

If you want to refresh only specific Pivot Tables with VBA code

Below VBA code you can use to update specific pivot table.

Sub RefreshCustomPivotTable()

With ActiveSheet

.PivotTables("PivotTable1").RefreshTable
.PivotTables("PivotTable2").RefreshTable
.PivotTables("PivotTable3").RefreshTable
.PivotTables("PivotTable4").RefreshTable
.PivotTables("PivotTable5").RefreshTable

End With

End Sub

Change the name of the pivot tables as per your workbook. And, if you want to update these custom pivot tables every time when you open a workbook, change the name of the macro to auto_open

Sub auto_open()

With ActiveSheet
.PivotTables("PivotTable1").RefreshTable
.PivotTables("PivotTable2").RefreshTable
.PivotTables("PivotTable3").RefreshTable
.PivotTables("PivotTable4").RefreshTable
.PivotTables("PivotTable5").RefreshTable
End With

End Sub

More on Pivot Table

We Create Your Life Easy With Our Free Excel Templates & Spreadsheet Dashboards

Use free Excel Templates, Tools and Dashboards to create and draft a professional looking dashboards and computation sheet for your personal and business use. You can Explore Calendars, Activity Planners, Invoice Templates, Sales Forecast Sheets, Budget templates and various business information delivering Templates in Excel and Spreadsheet at XLSX Templates. 

These templates, dashboards and tools are useful in various occasions. You can also customize these templates as per your requirement. Modification of fields and data source helps in making the template more relevant.

Learn Microsoft Excel : Blogs and Articles

Learn about various tips and tricks in Microsoft Excel and Spreadsheet. Create best templates and dashboards using free tricks and tutorials in excel and spreadsheet. These tutorial posts are useful for everyone who wants to master the skills in excel and spreadsheet.

Deselect Cells in Excel

How To Deselect Cells in Excel

Table of Contents How to Deselect Cells in Excel After adding the deselecting cells feature in Excel, this  becomes so  …

Select Non-Contiguous Cells in Excel

Learn how to Select Non-Contiguous Cells in Excel

Table of Contents Select cell without using Ctrl Key By following these simple steps we can do it. At first, …

Format Painter in Excel

How to use Format Painter in Excel

Table of Contents Where’s the Format Painter Button? It’s there on your Home Tab. If you look at the clipboard …

Apply Strikethrough in Excel [Shortcut + Command]

How to apply Strikethrough in Excel [Shortcut + Command]

Table of Contents Shortcut Key to Apply Strikethrough to a Cell Let’s say you’re in hurry and don’t want to …

Formula Bar in Excel

Formula Bar in Excel

Table of Contents Key Points To Consider Using Formula Bar You can hide or unhide the formula bar. You can …

Convert Date into Day

Convert Date into Day Sub date2day() Dim tempCell As Range Selection.Value = Selection.Value For Each tempCell In Selection If IsDate(tempCell) …

Basic VBA Macro Codes in Excel

Custom Header & Footer

Sub CustomHeader() Dim myText As String myText = InputBox(“Enter your text here”, “Enter Text”) With ActiveSheet.PageSetup .LeftHeader = “” .CenterHeader …

Get Macro Code

Add Header and Footer Date

Sub DateInHeader() With ActiveSheet.PageSetup .LeftHeader = “” .CenterHeader = “&D” .RightHeader = “” .LeftFooter = “” .CenterFooter = “” .RightFooter …

Get Macro Code

Open Calculator

Sub OpenCalculator() Application.ActivateMicrosoftApp Index:=0 End Sub In Windows, there is a specific calculator and by using this macro code you …

Get Macro Code

Unmerge Cells

Sub UnmergeCells() Selection.UnMerge End Sub Unmerge Cells code simply uses the unmerge options which you have on the HOME‌ tab. …

Get Macro Code

Remove Text Wrap

Sub RemoveTextWrap() Range(“A1”).WrapText = False End Sub This code will help you to remove text wrap from the entire worksheet …

Get Macro Code

Auto Fit Rows

Sub AutoFitRows() Cells.Select Cells.EntireRow.AutoFit End Sub You can use this code to auto-fit all the rows in a worksheet. When …

Get Macro Code

Auto Fit Columns

Sub AutoFitColumns() Cells.Select Cells.EntireColumn.AutoFit End Sub Use above Excel macro code to auto fit rows in all your sheet at …

Get Macro Code

Insert Multiple Columns

Sub InsertMultipleColumns() Dim i As Integer Dim j As Integer ActiveCell.EntireColumn.Select On Error GoTo Last i = InputBox(“Enter number of …

Get Macro Code

Insert Multiple Rows

Sub InsertMultipleRows() Dim i As Integer Dim j As Integer ActiveCell.EntireRow.Select On Error GoTo Last i = InputBox(“Enter number of …

Get Macro Code