Pivot Tables

GeorgeB

Board Regular
Joined
Feb 16, 2002
Messages
239
Greetings all
I have a procedure that creates a pivot table. When new data is added the procedure deletes the old table and creates a new one that includes the new data. The sheet number is incremented up each time IE.
Sheet(148) Any way to turn back the clock on this? I have tried renaming the sheet in the properties window but the next time the procedure runs it's back up to what it was plus one.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Why not change your procedure to include RefreshTable when new data is added eg

ActiveSheet.PivotTables("PivotTable2").RefreshTable
 
Upvote 0
That will work if the existing data is changed but when you add data to the bottom of the input area it doesn't see it.
 
Upvote 0
George - I keep the original sheet (it's renamed to something more suitable) clear only the data and use this simple routine to determine the last row in the data and substitute the variable RESP in the range for the pivot table. This way the pivot table no doesn't keep changing.

Range("A2").Select
Selection.End(xlDown).Select
ActiveCell.Select
RESP = ActiveCell.Row()
 
Upvote 0

Forum statistics

Threads
1,213,517
Messages
6,114,089
Members
448,548
Latest member
harryls

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top