![]() |
Copy used range from one worksheet to another (and lose the pivot)
I have a pivot table on a worksheet I'm calling myWS. I'd like to copy the
used range of this worksheet to another worksheet I'm calling ResWS, but lose the pivot. How would I do that programmatically? Thanks, Barb Reinhardt |
Copy used range from one worksheet to another (and lose the pivot)
Hi Barb, I don't use Pivots as a rule but it seems to me that when you set it
up, it creates a lot of precedents and dependents that are all tied to the sheet. So I would imagine that might be why they are all destroyed when you copy to a new sheet. Just makes a clean copy without the link complications. Of course, this is a guess. "Barb Reinhardt" wrote: I have a pivot table on a worksheet I'm calling myWS. I'd like to copy the used range of this worksheet to another worksheet I'm calling ResWS, but lose the pivot. How would I do that programmatically? Thanks, Barb Reinhardt |
Copy used range from one worksheet to another (and lose the pi
I'm not sure you understood my question. I want to copy what's in the pivot
to a new worksheet and lose all of the precedents/dependents. How do I do that programmatically? "JLGWhiz" wrote: Hi Barb, I don't use Pivots as a rule but it seems to me that when you set it up, it creates a lot of precedents and dependents that are all tied to the sheet. So I would imagine that might be why they are all destroyed when you copy to a new sheet. Just makes a clean copy without the link complications. Of course, this is a guess. "Barb Reinhardt" wrote: I have a pivot table on a worksheet I'm calling myWS. I'd like to copy the used range of this worksheet to another worksheet I'm calling ResWS, but lose the pivot. How would I do that programmatically? Thanks, Barb Reinhardt |
Copy used range from one worksheet to another (and lose the pi
This worked for me:
Sub Macro2() Range("A3").Select 'Or select a cell within your Pivot Table ActiveSheet.PivotTables("PivotTable1").PivotSelect "", xlDataAndLabel, True Selection.Copy Application.Goto Reference:="xxx-your-named-rangexxx" Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End Sub When you right-click on the Table, there is a Select Entire table option...I think that's the key here... HTH, Ryan--- -- RyGuy "Barb Reinhardt" wrote: I'm not sure you understood my question. I want to copy what's in the pivot to a new worksheet and lose all of the precedents/dependents. How do I do that programmatically? "JLGWhiz" wrote: Hi Barb, I don't use Pivots as a rule but it seems to me that when you set it up, it creates a lot of precedents and dependents that are all tied to the sheet. So I would imagine that might be why they are all destroyed when you copy to a new sheet. Just makes a clean copy without the link complications. Of course, this is a guess. "Barb Reinhardt" wrote: I have a pivot table on a worksheet I'm calling myWS. I'd like to copy the used range of this worksheet to another worksheet I'm calling ResWS, but lose the pivot. How would I do that programmatically? Thanks, Barb Reinhardt |
All times are GMT +1. The time now is 06:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com