ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pivot Table Calculations (https://www.excelbanter.com/excel-programming/300863-pivot-table-calculations.html)

banavas[_5_]

Pivot Table Calculations
 
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,


--
Message posted from http://www.ExcelForum.com


Debra Dalgleish

Pivot Table Calculations
 
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


banavas < wrote:
Dear Friends,

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

How can I copy a Pivot Table to another location?

Thanks,
G


---
Message posted from http://www.ExcelForum.com/



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 10:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com