FANDOM


Advanced Pivot TableEdit

1. Item count of Pivot Fields of any Pivot table.

Ans:-


pvtPivotTable.PivotFields(strPivotField).PivotItems.Count


2. Deselect first two items on any Pivot Fields of any Pivot table.


Ans:-

If pvtPivotTable.PivotFields(strPivotField).PivotItems(pvtPivotTable.PivotFields(strPivotField).PivotItems.Count).Name = "(blank)" Then

   LastPivotItems = pvtPivotTable.PivotFields(strPivotField).PivotItems.Count - 3
       pvtPivotTable.PivotFields(strPivotField).PivotItems(LastPivotItems + 3).Visible = False
   Else
       LastPivotItems = pvtPivotTable.PivotFields(strPivotField).PivotItems.Count - 2
   End If
  
   For I = 1 To LastPivotItems
      pvtPivotTable.PivotFields(strPivotField).PivotItems(I).Visible = False
   Next

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.