Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default 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

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
Pivot tables lose of data fields when selecting Justin[_3_] Charts and Charting in Excel 0 August 5th 08 07:00 PM
why do I lose cell format in a pivot table? Megglesface Excel Worksheet Functions 1 July 23rd 08 02:37 PM
Why would a pivot table lose its character? JohnK Excel Worksheet Functions 1 September 11th 06 07:19 PM
Why do I lose hundredths when summing elapsed times in a pivot tab pbv Excel Discussion (Misc queries) 1 August 8th 06 06:31 AM
Pivot Tables lose some formatting when Updated Jugglertwo Excel Discussion (Misc queries) 1 March 23rd 05 12:48 AM


All times are GMT +1. The time now is 02:47 PM.

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

About Us

"It's about Microsoft Excel"