Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using a variable to add fields to a pivot table
Please assist.
I have a data source that the last 3 of the 12 fields names will change each time the pivot report is generated. "This is part of what I have right now to create the report. ActiveSheet.PivotTables("PivotTable2").AddFields RowFields:=Array("Fld1", _ "Fld2", "Fld3", "Fld4", "Fld5", "Fld6", "Fld7", "Fld8", "Fld9", "Fld10", "Fld11", _ "Fld12") How can I change these fields to variables? And is it possible for my pivot to have fld1 and fld2 subtotals like: fld3 fld4 fld5 fld6 fld7 fld8 fld9 fld10 fld11 fld12 data data 3 2 4 5 10 2 1 3 data data 1 3 2 1 1 7 4 9 fld2 sum total 4 5 6 6 11 9 5 12 fld1 grand total Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem inserting calculated pivot fields into Pivot Table (2007) | Excel Discussion (Misc queries) | |||
fields names do not show in excel 2007 pivot table fields list | New Users to Excel | |||
Pivot Tables, Calculated Fields, and variable denominator | Excel Discussion (Misc queries) | |||
number of fields in the row fields in pivot table | Excel Discussion (Misc queries) | |||
Pivot Table - Object variable or with block variable not set? | Excel Programming |