LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default How to determine order of row fields in pivot table

I need to determine the order of row fields in any given pivot table.
Problem: I don't know how.

For an example please refer to http://www.cpearson.com/excel/pivots.htm on
C.Pearson's site.

Database fields: Who Week What Amount. The example pivot table has 3 row
fields:Who Week What.

I can address the row fields:

ActiveSheet.PivotTables(1).RowFields(1).name = Who

ActiveSheet.PivotTables(1).RowFields(2).name = Week

ActiveSheet.PivotTables(1).RowFields(3).name = What

I found that the indexes of RowFields are NOT determined by the order in
which the row fields appear in the pivot table, but rather by the order of
their appearance in the database. So when I switch the row fields in the
pivot table to What Week Who, the leftmost row field in the resulting pivot
table (What) must still be referred to as RowFields(3), not RowFields(1).

As a user can freely rearrange row fields of a pivot table, is there any
method to determine the actual order of these fields?

Thanks for any suggestion

Joerg Mochikun


 
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
Pivot Table and Pivot Table dates are not in correct order ls Charts and Charting in Excel 3 July 14th 09 04:02 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
How do I change the order between fields and items in Pivot T? Sergio Hernandez Excel Worksheet Functions 1 October 16th 08 05:50 AM
Specifying the order of pivot table calculated fields/items Rick Excel Discussion (Misc queries) 1 August 10th 08 01:56 AM
number of fields in the row fields in pivot table UT Excel Discussion (Misc queries) 0 April 13th 06 01:17 AM


All times are GMT +1. The time now is 08:09 PM.

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

About Us

"It's about Microsoft Excel"