I am trying to change the (blank) cells in a handful of pivot tables on the activesheet. What I thought was a simple code is giving me more problems than I thought.
Sub HideBlank()
Dim pvt As PivotTable
Dim P_i As PivotField
For Each pvt In ActiveSheet.PivotTables
Debug.Print pvt.Name
For Each P_i In pvt.PivotFields
If P_i.Value = "(blank)" Then
P_i.NumberFormat = ";;;"
End If
Next
Next
End Sub