Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Refresh Excel Pivot Table When New Data is Added using VBA

Hi there,

I have set up a pivot table and I use the following VBA to refresh.

ActiveSheet.PivotTables(PivotTable1).RefreshTable

My pivot table select the entire columns as its range and when data gets too
large, it crashes the computer.

Could you tell me how to specify the range so it would automatically pick
all the data up to the last row?

I have also specify last row with this VBA:
LastSales = SalesWS.Cells.Find(What:="*", SearchDirection:=xlPrevious,
SearchOrder:=xlByRows).Row


Many thanks


--
Picho
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Refresh Excel Pivot Table When New Data is Added using VBA

You could use a dynamic range as the source:

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

Picho wrote:
Hi there,

I have set up a pivot table and I use the following VBA to refresh.

ActiveSheet.PivotTables(PivotTable1).RefreshTable

My pivot table select the entire columns as its range and when data gets too
large, it crashes the computer.

Could you tell me how to specify the range so it would automatically pick
all the data up to the last row?

I have also specify last row with this VBA:
LastSales = SalesWS.Cells.Find(What:="*", SearchDirection:=xlPrevious,
SearchOrder:=xlByRows).Row


Many thanks




--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create refresh button in worksheet to refresh Pivot Table Data Ron Excel Worksheet Functions 1 October 13th 07 01:20 AM
Pivot Table with Data Added Monthly Dawg House Inc Excel Discussion (Misc queries) 1 March 28th 07 01:30 AM
update a Pivot Table with new data added to the base data Graham Y Excel Discussion (Misc queries) 1 March 19th 07 02:12 PM
Can Excel Viewer be used to refresh data in a pivot table? Brian O'Neill Excel Discussion (Misc queries) 1 July 30th 06 01:37 AM
Pivot Table REFRESH Flaw -- Saves Old Data in Selection Area AFTER REFRESH Ken Roberts Excel Programming 3 September 11th 03 06:02 AM


All times are GMT +1. The time now is 04:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"