C
Clarity News Hub

How do I refresh pivot table automatically when data changes without VBA?

Author

Rachel Ellis

Published Jan 12, 2026

Refreshing Pivot Tables Without a Macro

  1. Go to the Analyze tab in the ribbon.
  2. Choose the Options button.
  3. Go to the Data tab in the new window that opens.
  4. Check the box that says, “Refresh data when opening the file.”

How do you automatically update a pivot table when data changes?

And you can set your workbook to refresh its PivotTable data automatically when you open it.
...
Refresh data automatically when opening the workbook

  1. Click anywhere in the PivotTable to show the PivotTable Tools on the ribbon.
  2. Click Analyze > Options.
  3. On the Data tab, check the Refresh data when opening the file box.

How do you refresh a pivot table after adding data?

Manually Update a PivotTable

  1. Make a change to the PivotTable's source data.
  2. Navigate to the PivotTable.
  3. Click any cell inside the PivotTable. The PivotTable Tools are displayed on the ribbon.
  4. Click the Analyze tab on the ribbon.
  5. Click the Refresh button. Alt + F5 also refreshes the PivotTable.

Why is my pivot table not updating with new data?

To fix the problem, we need to open the PivotTable Options by right-clicking after selecting a cell within the Pivot Table. In the PivotTable Options dialog box, uncheck the box before the Autofit columns widths on update option and check the box before the Preserve cell formatting on update option.

How do you refresh a pivot table without changing formatting?

Setting to Preserve Cell Formatting

  1. Right-click a cell in the pivot table, and click PivotTable Options.
  2. On the Layout & Format tab, in the Format options, remove the check mark from Autofit Column Widths On Update. ...
  3. Add a check mark to Preserve Cell Formatting on Update.
  4. Click OK.
35 related questions found

How do I refresh a pivot table in VBA?

To do this:

  1. Select any cell in the Pivot Table.
  2. Go to Analyze –> Data –> Change Data Source. This will select the data source that you have used and will open the 'Change PivotTable Data Source' dialog box.
  3. In the Change PivotTable Data Source dialog box, update the range to include new data.
  4. Click OK.

How do I automatically refresh data in Excel?

Automatically refresh data at regular intervals

On the Data tab, in the Connections group, click Refresh All, and then click Connection Properties. Click the Usage tab. Select the Refresh every check box, and then enter the number of minutes between each refresh operation.

How do I create a dynamic pivot table?

Create a Pivot Table in Excel 2003

  1. Select a cell in the database.
  2. Choose Data>PivotTable and PivotChart Report.
  3. Select 'Microsoft Excel List or Database', click Next.
  4. For the range, type your range name, e.g. Database.
  5. Click Next.
  6. Click the Layout button.
  7. Drag field buttons to the row, column and data areas.

How do I refresh all PivotTables in a workbook?

The “Refresh All” button is a simple and easy way to refresh all the pivot tables in a workbook with a single click. All you need to do it is Go to Data Tab ➜ Connections ➜ Refresh All.

How do you refresh a pivot table on a Mac?

Answer: To refresh a pivot table, right-click on the pivot table and then select "Refresh Data" from the popup menu.

Why is my pivot table not picking up all data?

Show Missing Data

Refresh the pivot table, to update it with the new data. Right-click a cell in the Product field, and click Field Settings. On the Layout & Print tab, add a check mark in the 'Show items with no data' box. Click OK Go to Top.

Can I automate a pivot table?

With a small bit of VBA, you can create simple PivotTables automatically. PivotTables are a very clever and potent feature to use on data that is stored in either a list or a table. Unfortunately, the mere thought of creating a PivotTable is enough to prevent some people from even experimenting with them.

How do I dynamically update all PivotTables data source in Excel?

Source Code to Dynamically Update All Pivot Tables in Workbook With New Range

  1. lstrow = Cells(Rows.Count, 1).End(xlUp).Row.
  2. lstcol = Cells(1, Columns.Count).End(xlToLeft).Column.
  3. Set source_data = Range(Cells(1, 1), Cells(lstrow, lstcol))
  4. For Each pt In ws.PivotTables.
  5. pt.ChangePivotCache _

How do I dynamically update pivot table data source range in Excel?

How to create a dynamic Pivot Table to auto refresh expanding data in Excel?

  1. Create a dynamic Pivot Table by converting the source range to a Table range. ...
  2. Select the data range and press the Ctrl + T keys at the same time. ...
  3. Then the source data has been converted to a table range.

How do I automatically update data from one spreadsheet to another?

Type = in your cell, then click the other sheet and select the cell you want, and press enter. That'll type the function for you. Now, if you change the data in the original B3 cell in the Names sheet, the data will update everywhere you've referenced that cell.

How do you refresh a table in VBA?

You can trigger a data refresh when you navigate to a particular spreadsheet tab by pasting VBA code into the Worksheet_Activate event. Simply double-click the desired Sheet object in the VBA Project Pane to open the text editor (blank white sheet) within the Visual Basic Editor (keyboard shortcut Alt +F11).

How do I stop my pivot table from automatically formatting?

Here are the steps to turn off the Autofit on Column Width on Update setting:

  1. Right-click a cell inside the pivot table.
  2. Select “Pivot Table Options…” from the menu.
  3. On the Layout & Format tab, uncheck the “Autofit on column widths on update” checkbox.
  4. Press OK.

How do I make a pivot table pretty?

Dressing Up Your PivotTable Design

  1. Rename Columns (go to “Unformatted PivotTable” tab to try it yourself!) ...
  2. Change the Number Format (go to “Unformatted PivotTable” tab to try it yourself!) ...
  3. Change Blank Cells to Zeros (go to “PivotTable Zeroes” tab to try it yourself!) ...
  4. Change the Layout. ...
  5. Change the Color.

How do I create a dynamic PivotTable in VBA?

Use Dynamic Ranges in Pivot Tables

  1. Select a cell in the database.
  2. Choose Data | PivotTable and PivotChart Report.
  3. Select 'Microsoft Excel List or Database', click Next.
  4. For the range, type myData , then click Next.
  5. Click the Layout button.
  6. Drag field buttons to the row, column and data areas. ...
  7. Click OK, then click Finish.

How do I create a VBA code for a PivotTable?

The Simple 8 Steps to Write a Macro Code in VBA to Create a Pivot Table in Excel

  1. 'Declare Variables. Dim PSheet As Worksheet. ...
  2. 'Declare Variables. On Error Resume Next. ...
  3. 'Define Data Range. ...
  4. 'Define Pivot Cache. ...
  5. 'Insert Blank Pivot Table. ...
  6. 'Insert Row Fields. ...
  7. 'Insert Data Field. ...
  8. 'Format Pivot.

Can I write a macro to create PivotTable?

Just click anywhere inside the table that contains your data, and then run your macro. AND, because your source data is in a table, just add new rows as needed to your data, hit Refresh on your PivotTable and the new information will automatically appear.

Why is my pivot table not including all columns?

Right-click any cell in the pivot table and select Show Field List from the menu. This will make the field list visible again and restore it's normal behavior. The field list will disappear when a cell outside the pivot table is selected, and it will reappear again when a cell inside the pivot table is selected.

How do I show values instead of count in pivot table?

In the PivotTable, right-click the value field, and then click Show Values As. Note: In Excel for Mac, the Show Values As menu doesn't list all the same options as Excel for Windows, but they are available. Select More Options on the menu if you don't see the choice you want listed.

How do you automatically refresh Excel on a Mac?

Right-click a data type > Data Type > Refresh Settings. In Data Types Refresh Settings, select one of the data types in the workbook to expand it. Select one of the options to apply it to that data type. You can either refresh when you open the file, manually, or automatically every five minutes.