tech on the net
Home About Us Feedback Site Map

Microsoft

Access Excel Word

Database

SQL Oracle / PLSQL SQL Server MySQL MariaDB PostgreSQL

Web Development

HTML CSS Color Picker

Language

C Language

More

ASCII Table Linux UNIX Java Clipart Joke of the Moment

Other Sites

CheckYourMath BigActivities DigMinecraft
Share this page:

MS Excel: Refresh multiple pivot tables with a button in Excel 2003/XP/2000/97

See solution in other versions of Excel:

Question: In Microsoft Excel 2003/XP/2000/97, is it possible to create a button that will refresh/update multiple pivot tables?

Answer: Yes, you can refresh multiple pivot tables with a button. To do this:

Under the View menu, select Toolbars > Forms.

Microsoft Excel

Create a button in your spreadsheet using the Forms toolbar. To do this, click on the button icon (currently highlighted in picture below) and click on your spreadsheet where you would like the button to appear.

Microsoft Excel

After creating the button, the Assign Macro window should appear. Click on the "New" button.

Microsoft Excel

Then paste in similar code as below in the Button_Click event:

Sheets("Sheet1").Select
ActiveSheet.PivotTables("PivotTable1").RefreshTable
Sheets("Sheet2").Select
ActiveSheet.PivotTables("PivotTable2").RefreshTable

Microsoft Excel

You will need to replace the Sheet1 and Sheet2 with the names of your sheets and PivotTable1 and PivotTable2 with the names of your pivot tables.

To find out the name of a pivot table, right-click on the pivot table and select Table Options.

Microsoft Excel