ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pivot Table and Last Row (https://www.excelbanter.com/excel-programming/297924-pivot-table-last-row.html)

Aaron[_14_]

Pivot Table and Last Row
 
I am trying to refresh a Pivot table to the last row in a Macro. Any Ideas

Here is what I have so far

Sub Refresh(

Sheets("PivotCharts").Selec
ActiveSheet.PivotTables("PivotTable11").RefreshTab l

End Su

Thanks in advance
Aaron

Debra Dalgleish

Pivot Table and Last Row
 
Are you trying to refresh the pivottable so it includes new data that
you've added to the source table? You can base the pivot table on a
dynamic range, which will automatically expand to include new items.
There are instructions he

http://www.contextures.com/xlPivot01.html

Then, when you refresh the pivottable, the new data will be included.

Aaron wrote:
I am trying to refresh a Pivot table to the last row in a Macro. Any Ideas?

Here is what I have so far.

Sub Refresh()

Sheets("PivotCharts").Select
ActiveSheet.PivotTables("PivotTable11").RefreshTab le

End Sub



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 10:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com