Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Enumerating PivotItems collection fails to display duplicate values

I have a PivotTable laid out with 5 RowFields. The 5th RowField
contains some duplicate strings amongst its PivotItems collection.
When I walk all of the PivotItems in a loop statement, the duplicate
strings don't enumerate. So if I had for example, 50 PivotItems and 5
of them were duplicate values of another PivotItem, my loop statement
would only show 45 PivotItems, just the unique strings.

Is there a way to enumerate all 50 PivotItems? There is unique data
within the 1-4 RowFields for each item in the 5th RowField that I have
to enumerate. Maybe my current implementation is the problem? For
each PivotItem I enumerate, I get it's associated
PivotItem.DataRange.Row value and pull data from columns "A", "B", "C",
"D", where those would equate to RowFields 1-4 in my case.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Enumerating PivotItems collection fails to display duplicate values

Maybe showing your code would help.

--
Regards,
Tom Ogilvy


"kirk" wrote in message
oups.com...
I have a PivotTable laid out with 5 RowFields. The 5th RowField
contains some duplicate strings amongst its PivotItems collection.
When I walk all of the PivotItems in a loop statement, the duplicate
strings don't enumerate. So if I had for example, 50 PivotItems and 5
of them were duplicate values of another PivotItem, my loop statement
would only show 45 PivotItems, just the unique strings.

Is there a way to enumerate all 50 PivotItems? There is unique data
within the 1-4 RowFields for each item in the 5th RowField that I have
to enumerate. Maybe my current implementation is the problem? For
each PivotItem I enumerate, I get it's associated
PivotItem.DataRange.Row value and pull data from columns "A", "B", "C",
"D", where those would equate to RowFields 1-4 in my case.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Enumerating PivotItems collection fails to display duplicate values

Thanks for the follow-up Tom.

I ended up restructuring my code to work successfully. What I did was
obtain the start and end rows of the pivot table, obtain the Excel
column for the data I was previously fetching pivot items from, obtain
the Excel columns for the necessary associated data, then just walk the
range of rows from start to end to perform my business.

Tom Ogilvy wrote:
Maybe showing your code would help.

--
Regards,
Tom Ogilvy


"kirk" wrote in message
oups.com...
I have a PivotTable laid out with 5 RowFields. The 5th RowField
contains some duplicate strings amongst its PivotItems collection.
When I walk all of the PivotItems in a loop statement, the duplicate
strings don't enumerate. So if I had for example, 50 PivotItems and 5
of them were duplicate values of another PivotItem, my loop statement
would only show 45 PivotItems, just the unique strings.

Is there a way to enumerate all 50 PivotItems? There is unique data
within the 1-4 RowFields for each item in the 5th RowField that I have
to enumerate. Maybe my current implementation is the problem? For
each PivotItem I enumerate, I get it's associated
PivotItem.DataRange.Row value and pull data from columns "A", "B", "C",
"D", where those would equate to RowFields 1-4 in my case.


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
Display only duplicate values and delete UNIQUE Items WYMMIY Excel Discussion (Misc queries) 2 August 25th 08 12:50 PM
Accessing values in points collection of chart & conditional display nnj Charts and Charting in Excel 1 August 3rd 05 10:29 PM
Enumerating Printers Michael D. Ober[_2_] Excel Programming 8 October 21st 03 01:25 PM
Compare Listbox values with Collection values Stuart[_5_] Excel Programming 2 September 20th 03 01:58 PM
Add PivotItems to PivotTable / Enabling - Disabling PivotItems Ole[_3_] Excel Programming 1 July 8th 03 03:24 PM


All times are GMT +1. The time now is 11:48 PM.

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"