• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to get value from multiple selected items in Report filter of pivot table

adura

New Member
Hi,
can someone help me, i have a code dto loop through only selected items in report filter of a pivot table, instead of using only selected item, the code use all items either selected not selected. I have search through net and use the visible element of the PivotItems.visible= true, both not working. Pls very urgent if someone can help
attached is the piece of my code
Code:
If ActiveSheet.PivotTables("PivotTable1").PivotFields("Node").EnableMultiplePageItems = True Then
   For x = 5 To lastrow
       For i = 1 To ActiveSheet.PivotTables("PivotTable1").PivotFields("Node").PivotItems.Count
           If ActiveSheet.PivotTables("PivotTable1").PivotFields("Node").PivotItems(i).Visible = True Then
              If ActiveSheet.PivotTables("PivotTable1").PivotFields("Node").PivotItems(i).Value = Sheets("CurrentReport").Range("j" & x) Then 'if selected then
                  If secAvailable(Sheets("CurrentReport").Range("k" & x)) Then
                    Total = Total + Val(Sheets("CurrentReport").Range("f" & x))
                 End If
              End If
           End If
       Next i
   Next x
End If
 
Last edited by a moderator:
i want to add some data that matched multiple selection from Node FilterItem. with single selection its worked correctly, also with "(All)" selection its work perfectly but with multiple selection using the above nothing was selected. I want to pick Selected items in multiple Selection during Iteration and compare this value with another value
 
Back
Top