Creating an automatic copy of a pivot table

Mel C Roberts

New Member
Joined
Feb 26, 2002
Messages
40
Beginning to drive me mad!!
As a relative beginner to the world of Pivot Tables and VB i wonder if anyone can help.

I have created a Pivot table with six columns. Four Pull from a spreadsheet and two are calculated items (which out of interest took me hours to work out how to do as well!!)
My problem is that i need the four columns to have summed totals, but the totals for the calculated fields need to be calculations rather than sums. It has been suggested the best way is to copy the table into another worksheet and then create VB to enable me to update the information. I have managed to locate the following from the web - but do not understand which bits i need to change to make it run in my spreadsheet.

Can anyone decipher the gobbldey gook below for me??
Thanks in advance


Sub Update_Copy_Table()
Application.ScreenUpdating = False
With Worksheets("Summary of Complaints")
.Activate
.PivotTables(1).TableRange2.Select
Application.Dialogs(xlDialogPivotTableWizard).Show
.PivotTables(1).TableRange2.Select
End With
With Worksheets("Sheet 1")
.UsedRange.Clear
Selection.Copy
.Activate
.Range("B3").PasteSpecial Paste:=xlValues
.UsedRange.AutoFormat xlColor2
End With
End Sub
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,214,517
Messages
6,119,984
Members
448,935
Latest member
ijat

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