View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ken Wright Ken Wright is offline
external usenet poster
 
Posts: 634
Default Loop through PivotItems of PageField - including "(All)"

Drag your Staff name field into the Page items area and then use the Show
pages option

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"Paul Martin" wrote in message
om...
Hi all

I know how to loop through the PivotItems of a PageField on a
PivotTable. I want to extract data into multiple tables, one for each
pivot item. The following line does this well:

For Each pi In pt.PageFields("Staff Name").PivotItems

I am building multiple tables, one for each staff name. But I also
want to include a table for "(All)". Is there an easy way to include
this, preferably within a loop, so that I don't have to repeat the
code to build one table?

Thanks in advance

Paul Martin
Melbourne, Australia