VBA Moving Table: Add Filter

Using VBA code, I created a pivot table and then added rows, columns and then summation values. Now I need to add a filter to the column. Could you please tell me how to add filters to this column.

+3


source to share


2 answers


Try using the following code:

Sub Makró2()
    With ActiveSheet.PivotTables("Kimutatás1").PivotFields("a")
        .PivotItems("asd").Visible = False
        .PivotItems("hj").Visible = False
    End With
End Sub

      



For example:

enter image description here

+2


source


Try to enter a line of codes



With ActiveSheet.PivotTables("PivotTable Name").PivotFields("Column Name").Orientation = xlPageField.Position = 1

      

0


source







All Articles