Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub FilterCustomers()
- Dim f As String: f = InputBox("Type the text you want to filter:")
- With Sheets("Customers").PivotTables("Customers_PivotTable")
- .ClearAllFilters
- .PivotFields("Concatenation for filtering").CurrentPage = "*f*"
- End With
- End Sub
- Sub FilterCstomers()
- Dim f As String: f = InputBox("Type the text you want to filter:")
- Dim PvtItm As PivotItem
- With Sheets("Customers Pivot").PivotTables("Customers_PivotTable")
- .ClearAllFilters
- For Each PvtItm In .PivotFields("Concatenation for filtering").PivotItems
- If PvtItm.Name Like "*" & f & "*" Then
- PvtItm.Visible = True
- Else
- PvtItm.Visible = False
- End If
- Next PvtItm
- End With
- End Sub
- Sub FilterCstomers()
- Dim f As String: f = InputBox("Type the text you want to filter:")
- Dim PvtItm As PivotItem
- With Sheets("Customers Pivot").PivotTables("Customers_PivotTable")
- .ClearAllFilters
- For Each PvtItm In .PivotFields("Concatenation for filtering").PivotItems
- If PvtItm.Name Like "exemplo1" Then
- PvtItm.Visible = True
- Else
- If PvtItm.Name Like "exemplo2" then
- else
- PvtItm.Visible = False
- End If
- End If
- Next PvtItm
- End With
- End Sub
Add Comment
Please, Sign In to add comment