mlagrange
asked on
How to resize range used by pivot table?
Hello - I've got a pivot table that is based on a range of data built up on one tab from a series of copy/paste operations from another tab. The final range will be larger (more rows) every time the operation is run.
How can I resize the range in the pivot table data source after the copy/paste's?
Thanks
How can I resize the range in the pivot table data source after the copy/paste's?
Thanks
ASKER
I'm sorry - I should have said that I was trying to do this in VBA.
But you did get me started; I created a small range on the target tab:
MyTargetTab!$A$1:$C$2
I kicked off the copy/paste process:
Sheets("MyTargetTab").Sele ct
Range("L1Table").ClearCont ents
and ran to the point after it pasted in the first set of data (~200 rows). The range stayed at $A$1:$C$2; it did not expand to encompass the pasted data.
I was thinking the $'s was what made a range dynamic
Do you have a VBA solution?
Thanks for your response
But you did get me started; I created a small range on the target tab:
MyTargetTab!$A$1:$C$2
I kicked off the copy/paste process:
Sheets("MyTargetTab").Sele
Range("L1Table").ClearCont
and ran to the point after it pasted in the first set of data (~200 rows). The range stayed at $A$1:$C$2; it did not expand to encompass the pasted data.
I was thinking the $'s was what made a range dynamic
Do you have a VBA solution?
Thanks for your response
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Works like a charm! Thanks!
Two better ways, one easy, one more complex:
Thomas