View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mark Mark is offline
external usenet poster
 
Posts: 989
Default List of Displayed Pivot Items

I worked it up using the address of the pivot tables row range, the position
of the field I'm interested in, and the number of rows in the row range.

Then had it walk down the proper column, putting the values into a string
array.

It works.

Had hoped there was a more automatic way, but this isn't long.

"mark" wrote:

Hi.

I'm looking for a way to quickly get a list of the displayed pivot items in
a pivot field.

For instance, I have two row fields in the pivot table. The first row field
has several pivot items, and I've selected the <blank pivot item in row
field 1.

I want to know what items that leaves displayed in row field 2.

In my case, it's a list of 4 items.

I tried the .visibleitems collection of row field 2, but that gives all of
the items that are checked, not the small subset that had a row field 1 =
<blank

I think I could do it by starting at the top of the cells where row field 2
is displayed, and walking down through the cells of the pivot table, but that
seems clunky.

Suggestions?

Thanks.