Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem inserting calculated pivot fields into Pivot Table (2007) wamiller36 Excel Discussion (Misc queries) 1 March 5th 10 11:40 PM
fields names do not show in excel 2007 pivot table fields list marlo17 New Users to Excel 2 December 1st 08 01:25 PM
Pivot Tables, Calculated Fields, and variable denominator Jeff C Excel Discussion (Misc queries) 1 June 27th 08 03:08 AM
number of fields in the row fields in pivot table UT Excel Discussion (Misc queries) 0 April 13th 06 01:17 AM
Pivot Table - Object variable or with block variable not set? George Nicholson[_2_] Excel Programming 1 April 16th 04 09:12 PM


All times are GMT +1. The time now is 08:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"