Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
pivot table destination
Hi,
Is it possible to create a pivot table on a new sheet but to choose its position ? Like you can choose when it is on the same worksheet. Is it with .CreatePivotTable TableDestination:="" ? Cheers, Douvid |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
pivot table destination
The following code creates a new sheet, and creates the PT at cell A3:
'============================= Sub PivotTableNewSheet() Dim ws1 As Worksheet Dim wsNew As Worksheet Set ws1 = ActiveSheet Set wsNew = Worksheets.Add ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, _ SourceData:="Database").CreatePivotTable _ TableDestination:=wsNew.Range("A3"), _ TableName:="PivotTable1" wsNew.PivotTables("PivotTable1").AddFields _ RowFields:="Year", ColumnFields:="Region" wsNew.PivotTables("PivotTable1").PivotFields("Unit s") _ .Orientation = xlDataField ws1.Select End Sub '============================= Douvid wrote: Hi, Is it possible to create a pivot table on a new sheet but to choose its position ? Like you can choose when it is on the same worksheet. Is it with .CreatePivotTable TableDestination:="" ? Cheers, Douvid -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to create pivot table from existing pivot table in excel 2007 | Excel Discussion (Misc queries) | |||
Print Pivot Table headers on pages with Pivot Table | Excel Worksheet Functions | |||
Filter lines with Pivot table and non pivot table columns | Charts and Charting in Excel | |||
Filter lines containing pivot table and non pivot table data | Excel Worksheet Functions | |||
Help required with setting up a pivot table with the source on sheet1 to have the pivot table created on sheet called "report" | Excel Programming |