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
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