Hi
I am trying to hide zero values in a pivottable in excel. I have tried the following code but can't seem to get it to work
I have a row field of "Project_Number" and a column field of "Year" and a page item of "QTR". The value is "Sum of OPEN_PO_AMOUNT"
I have some values that are zero and I want to exclude then from my report.
Can anyone help?
Ian
I am trying to hide zero values in a pivottable in excel. I have tried the following code but can't seem to get it to work
Sub hidezerovalues_Click()
Dim pf As PivotField
Dim pi As PivotItem
Set pf = ThisWorkbook.Worksheets("POPIV").PivotTables("PIV_PO_DETAIL").PivotFields("PROJECT_NUMBER")
For Each pi In pf.PivotItems
If pi.Value = 0 Then pi.Visible = False
Next pi
End Sub
I have a row field of "Project_Number" and a column field of "Year" and a page item of "QTR". The value is "Sum of OPEN_PO_AMOUNT"
I have some values that are zero and I want to exclude then from my report.
Can anyone help?
Ian