Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does anyone have a quick macro that goes an updates the data range for
a pivot table? At present, additional data rows are being added to the data set which are below and outside of the data range previously defined. The data is on a different worksheet to the pivot table. I would like to simply assign this macro to a button next to the pivot table so that the user spends no time manually updating the data range to include the additional rows added each month. Thanks Mike |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
the easiest way is to use a dynamic range to define the database
Insert=Name=Define Name: MyData Refersto: =Offset(Sheet3!$A$1,0,0,CountA(Sheet3!$A:$A),10) then make that the source for you pivot table. Now, whenever the user refreshes the data, it will use the expanded range. If you want to have your button refresh the data, the code would be Private Sub CommandButton1_Click() worksheets("Sheet1").PivotTables("Table1").Refresh Table End Sub -- Regards, Tom Ogilvy "Mike_M" wrote in message oups.com... Does anyone have a quick macro that goes an updates the data range for a pivot table? At present, additional data rows are being added to the data set which are below and outside of the data range previously defined. The data is on a different worksheet to the pivot table. I would like to simply assign this macro to a button next to the pivot table so that the user spends no time manually updating the data range to include the additional rows added each month. Thanks Mike |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks - much appreciated
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
update pivot table data range | Charts and Charting in Excel | |||
record a macro to update pivot table | Excel Discussion (Misc queries) | |||
How do I set the pivot table to auto-update the data range? | Excel Discussion (Misc queries) | |||
Update Data Field in Pivot Table with Dynamic Excel Range | Excel Programming | |||
Macro to update Pivot Table | Excel Programming |