» Automatically Refreshing a PivotTable Report in Excel 2007
CATEGORY: Excel Pivot Tables |
VERSIONS: Microsoft Excel 2007 |
|
To automatically refresh the data in a PivotTable Report: Step 1: Automatically update the source data range Name See tip: Automatically Updating a Range Name Reference. Step 2: Add a VBA Event to automatically refresh the PivotTable report 1. Press Alt+F11, and then double-click the sheet name in the VBAProject pane. 2. From the left dropdown list above the Module sheet, select Worksheet, and from the right dropdown list, select Activate. 3. Copy the code below and paste it into the Module sheet. Private Sub Worksheet_Activate() ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh End Sub 4. Press Ctrl+S to save the workbook, and then press Alt+F4 to close the VBA. The PivotTable report is refreshed automatically upon selecting the sheet that contains it. Note: To find the PivotTable report name (in this example, "PivotTable1"), select PivotTable Tools -> Options -> PivotTable Name (in PivotTable Options). |
Book Store:
Recommended Books:
- Special Edition Using Microsoft Office XP
- Business Analysis with Microsoft Excel (2nd Edition)
- The South Beach Diet: The Delicious, Doctor-Designed, Foolproof Plan for Fast and Healthy Weight Loss
- Mastering Excel 2000 (for beginner)
- F1 Get the Most out of Excel! The Ultimate Excel tip Help Guide
- Microsoft Word Version 2002 Step By Step (With CD-ROM)
Related MS EXCEL TIPS:
Terms
and Conditions of use
The applications/code on this site are distributed as is and without warranties
or liability. In no event shall the owner of the copyrights, or the authors
of the applications/code be liable for any loss of profit, any problems
or any damage resulting from the use or evaluation of the applications/code.





