View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default (previous discussion with Tom - Dynamically creating pt from li

Tom,

In XL XP (IIRC), a page field was added, sort of like using a primary row field that allowed you to
show just one item (but you can only show one, not select which ones with check boxes like you can
in a regular row field).

In the Pivot Table Field List dialog, there is an "Add to" section, and you can select "Page Area"
in that selection box.

Bernie


"Tom Ogilvy" wrote in message
...
I am not sure what a page filter is with respect to a pivot table. Could you
elaborate or send me a sample workbook with an explanation



--
regards,
Tom Ogilvy


"klysell" wrote:

Hi Tom,

I tried your code and I think it needs to be adjusted so that "page filters"
and not "page fields" are being updated from my list in the Summary sheet
(contained in Columns C and D). I tried to update it, but it didn't work. I
created a master pivot table with the desired format and the link to the data
and named it "PIV_Template". Here is the code that I have so far adapted from
your original code:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim pi As PivotItem
If Target.Count 1 Then Exit Sub
If Target.Column = 3 Or Target.Column = 4 Then
Sheets("PIV_Template").Copy After:=Worksheets(Worksheets.Count)

If Target.Column = 3 Then
With sh.PivotTables("Project_View") _
.PageFields("ITBGrp")
For Each pi In .PivotItems
If LCase(pi.Value) = LCase(Target.Value) Then
.CurrentPage = pi.Value
End If
Next
End With
ElseIf Target.Column = 4 Then
With sh.PivotTables("Project_View") _
.PageFields("IO_Grp")
For Each pi In .PivotItems
If LCase(pi.Value) = LCase(Target.Value) Then
.CurrentPage = pi.Value
End If
Next
End With
End If
sh.Activate
End If
End Sub

Thanks a million.
--
Kent Lysell
Financial Consultant
Ottawa, Ontario
W: 613.948-9557