I have an Excel dataset to be pivoted with row labels grouped by months (row labels are dates).
I have the VBA setup to do the pivot and then group the row labels to months.
After it groups to months, I'm trying to get the (blank) field in the dropdown to deselect.
I tried recording a macro; it just did it like "<11/15/15".
I found code, but I get the error message
pivot item cannot be found.
Dim p_i As PivotItem
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Delivery Time of Actual Item")
.PivotItems("(blank)").Visible = True
For Each p_i In .PivotItems
If p_i.Name = "(blank)" Then
p_i.Visible = False
End If
Next
End With
Could the issue be that I group the items by month first?
.PivotItems("(blank)").Visible = True
does it work? – Scott Holtzman.PivotItems("(blank")).Visible = True
line, but did not fail on theFor Loop
. I hope this testing helps you some way. – Scott Holtzman