Forum Discussion
Get pivot data
If you convert the source data to a table, and use the table range as data source for the pivot table, it should automatically include new rows. But the pivot table will have to be refreshed.
You can do this when the workbook is opened, or when the sheet with the pivot table(s) is activated. Which would you prefer?
- LisaMc1021Oct 17, 2023Copper ContributorWhen I open the workbook I can hit refresh.
- HansVogelaarOct 17, 2023MVP
You can click in a pivot table, activate the PivotTable Analyze tab, and select Refresh > Refresh All.
If you want this to happen automatically:
Press Alt+F11 to activate the Visual Basic Editor.
Double-click ThisWorkbook in the Project Explorer pane on the left.
Copy the following code into the ThisWorkbook module:
Private Sub Workbook_Open() Me.RefreshAll End SubSwitch back to Excel.
Save the workbook as a macro-enabled workbook (*.xlsm).
Make sure that you allow macros when you open it.
- LisaMc1021Oct 17, 2023Copper ContributorCan you walk me through converting the source data to a table please?