• 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.

Pivot Items - Data Extraction

chandrashekarb

New Member
Hi,


How do extract data of particular pivot item using VBA. for ex. I need to extract data of

pvt_tbl.PivotFields("Priority").PivotItems(1).Visible in the same worksheet. Thanks!

With pvt_tbl

pvt_tbl.PivotFields("Priority").PivotItems(1).Visible = True

pvt_tbl.PivotFields("Priority").PivotItems(2).Visible = False

pvt_tbl.PivotFields("Priority").PivotItems(3).Visible = False

pvt_tbl.PivotFields("Priority").PivotItems(4).Visible = False

End With
 

Luke M

Excel Ninja
I recommend using the GetPivotData object (works just like the GETPIVOTDATA function). See the VB and/or the Excel help file for details.
 

chandrashekarb

New Member
Hi Lue,


I need data i.e. when we double click on any pivot item data, we get data in a new sheet. Same way I need this to be done. If I am confusing let me know.
 

Luke M

Excel Ninja
Ah. Once you know what item you want to select, use something like this:


Selection.ShowDetail = True
 

chandrashekarb

New Member
But knowing particular item only is difficult. In this case I want to get data based on pivot item(1). Can u please give me full code. Thanks!
 
Top