A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Extracting Pivotable Selections



 
 
Thread Tools Display Modes
  #1  
Old August 6th, 2004, 02:19 PM
external usenet poster
 
Posts: n/a
Default Extracting Pivotable Selections

In a field, if you elect to only include certain items,
then when you select all of those items the table displays
(Multiple Items) rather than (All). Is there a way to
obtain a list of the items that are included (or excluded)
from the Multiple Items group? I know how to see the
list, but is there a way to move that info to cells in the
spreadsheet?
  #2  
Old August 6th, 2004, 06:27 PM
Debra Dalgleish
external usenet poster
 
Posts: n/a
Default Extracting Pivotable Selections

The following code will print the page field items that aren't hidden:

'============================
Sub ListFieldsVisible()
'lists visible page field items on a new worksheet
Dim ws As Worksheet
Dim pt As PivotTable
Dim pf As PivotField
Dim pi As PivotItem
Dim rw As Integer
Set ws = Worksheets.Add
ws.Activate
Set pt = Worksheets("Pivot").PivotTables(1)
rw = 0
For Each pf In pt.PageFields
For Each pi In pf.PivotItems
On Error Resume Next
pf.CurrentPage = pi.Name
If pi.Visible = True Then
rw = rw + 1
ws.Cells(rw, 1).Value = pf.Name
ws.Cells(rw, 2).Value = pi.Name
End If
Next
Next pf
End Sub
'=========================

wrote:
In a field, if you elect to only include certain items,
then when you select all of those items the table displays
(Multiple Items) rather than (All). Is there a way to
obtain a list of the items that are included (or excluded)
from the Multiple Items group? I know how to see the
list, but is there a way to move that info to cells in the
spreadsheet?



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using List Box Selections As Query Criteria Kevin Sprinkel Using Forms 2 July 6th, 2004 09:53 PM
Multiple selections in a Drop Box Chad Worksheet Functions 1 May 28th, 2004 02:57 PM


All times are GMT +1. The time now is 03:13 AM.


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