Hello! I have a macro below that is supposed to filter out all 'no data' ("") values. The data set will be added to constantly so I want new values to be included but I don't want blanks. However, the macro returns Error 1004: Unable to get the PivotItems property of the PivotField class.
Please note that the "" value exists in the raw data so there should be no reason why it's erroring out. Is something wrong with my notation in 'PivotFields'? Thanks very much!
Macro:
Sub Test()
Sheets("ABC").Select
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Name XYZ")
.PivotItems("").Visible = False
End With
End Sub
Please note that the "" value exists in the raw data so there should be no reason why it's erroring out. Is something wrong with my notation in 'PivotFields'? Thanks very much!
Macro:
Sub Test()
Sheets("ABC").Select
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Name XYZ")
.PivotItems("").Visible = False
End With
End Sub