Pivot Table Calculations

B

banavas

Dear Friends,

How can I perform operations with the values created from a pivo
table?

How can I copy a Pivot Table to another location?

Thanks,
 
D

Debra Dalgleish

To copy a pivot table:

Sheets("Pivot").PivotTables(1).TableRange2.Copy _
Destination:=Sheets("Sheet1").Range("A1")

To work with pivottable values, use the GetPivotData method:

Dim pt As PivotTable
Set pt = Sheets("Pivot").PivotTables(1)

Dim rng As Range
Set rng = pt.GetPivotData("Units", "Region", "Ontario")

Sheets("Sheet1").Range("H1").Value = rng.Value
 
Top