Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Dec 2006
    Posts
    250
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro/VBA if statement-Excel 2010

    I am trying to write a VBA if statement. What I would like to do is for the pivot table to only show the PivotItems where the number is 1700 and everything else to not show. Any help would be greatly appreciated.

    If ActiveSheet.PivotTables("PivotTable1").PivotFields ("Indx").PivotItems = "1700" Then
    PivotItems.Visible = True

    End If

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    Is Indx a filter field or a row or column field?
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •