Copy Pivot Table values and formatting to a new location in worksheet/over PT

akg742

New Member
Joined
Mar 13, 2014
Messages
39
I have a pivot table in A3 of a tab called "at risk". Before I can share my file, I need to delete the source values. Which means I need to replace the pivot table with just the values and formatting. I'd like to do that in the same worksheet so people using this file won't really notice anything is different, either by pasting over the current table or copying it into a new location and then deleting the original.

I've been trying to adapt Contextures' macro but there are too many commands I don't understand so I can't just make modifications for my needs.

Thanks!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
for this type of thing I would save a copy of the file then copy the Pivot and paste it as values where it is and share the copy of the sheet. Depends if you need to share other parts of the file or just this sheet.
 
Upvote 0
for this type of thing I would save a copy of the file then copy the Pivot and paste it as values where it is and share the copy of the sheet. Depends if you need to share other parts of the file or just this sheet.
Thanks for the help. I did finally get things to work the way I wanted them to, although I'm not exactly sure what some of the code is doing.
 
Upvote 0
Thanks for the help. I did finally get things to work the way I wanted them to, although I'm not exactly sure what some of the code is doing.
If you copy the pivot table in one go you lose the formatting, the code overcomes this by copying it pieces.
First from the column headings down to just before the grand total, then the grand total, then it checks if there are page filter if they exist that gets copied.

Let us know if it is still not doing what you need it to do.

In slow motion it would look like this:

1683964753992.png
 
Upvote 0

Forum statistics

Threads
1,215,509
Messages
6,125,216
Members
449,215
Latest member
texmansru47

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