Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I have a quick questions that I believe can be answered quickly. I have a PivotTable with the following Pivot Fields: GROUP NAME DIV What I'm wondering is whether I can select a Pivot Item from a combination of two fields values. For instance, I need to add items to a new collection where the item in the "GROUP" field matches a previously selected value. In simplist form, i need to add all items in the "NAME" field where the "GROUP" field matches the previously selected value. I'm sure that the items index will help, but i can only stay within the nominated pivot field. Sample Code: (If it helps) Set oPiv = frmNewProgramDetails.oPiv ' From Unfocused Form) oSelectedGroup = frmNewProgramDetails.cmbGroup ' Value to match For Each Item In oPiv.PivotFields("NAME").PivotItems If oPiv.PivotField("GROUP").PivotItem(Item) = oSelectedGroup Then 'I want it to add to the colListItems only if the "GROUP" = oSelectedGroup colListItems.Add Item End If Next Item Hope someone can shed some light on this. Thanks in advance, Paul Mac |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pivot Table field selection order | Excel Discussion (Misc queries) | |||
Synchronize the Pivot table page field selection in 2 tables? | Excel Worksheet Functions | |||
Multiple Field Selection for Pivot table Values Section | Excel Worksheet Functions | |||
Selection of multiple values for pivot table field | Excel Discussion (Misc queries) | |||
Multiple selection in the page area of a pivot table | Excel Discussion (Misc queries) |