Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

Remove the CalculatedItem by deleting it from either the CalculatedItems collection or the PivotItems collection of the PivotField.t

Sub DeleteCalculatedItem()      With ActiveSheet.PivotTables(1).PivotFields("Product")          .PivotItems("Melons").Delete      End With End Sub