joshcas
01-13-2014, 10:33 AM
Hi ,
This morning I'm having a difficult challenge , I'm trying to change the Pivotitems with a "Blank" value to "Revenue" for a particular PivotField , I thought it might be really simple but it's not , can you guys point me to the correct direction ? :)
Here is the code that I'm using , doesn't seem to be updating the pivot tables
Sub Clear_Blank_PivotItems()
On Error Resume Next
With ThisWorkbook
For Each WS In .Worksheets
For Each PT In WS.PivotTables
' PT.PivotCache.MissingItemsLimit = xlMissingItemsNone
For Each PI In PT.PivotFields("SNP Quarterly Level 4").PivotItems
If PI.Name = ("") Then
'MsgBox ("true")
PI.Value = "Revenues "
End If
Next PI
PT.PivotCache.Refresh
Next P
Next WS
End With
End Sub
This morning I'm having a difficult challenge , I'm trying to change the Pivotitems with a "Blank" value to "Revenue" for a particular PivotField , I thought it might be really simple but it's not , can you guys point me to the correct direction ? :)
Here is the code that I'm using , doesn't seem to be updating the pivot tables
Sub Clear_Blank_PivotItems()
On Error Resume Next
With ThisWorkbook
For Each WS In .Worksheets
For Each PT In WS.PivotTables
' PT.PivotCache.MissingItemsLimit = xlMissingItemsNone
For Each PI In PT.PivotFields("SNP Quarterly Level 4").PivotItems
If PI.Name = ("") Then
'MsgBox ("true")
PI.Value = "Revenues "
End If
Next PI
PT.PivotCache.Refresh
Next P
Next WS
End With
End Sub