CalculatedItems.Add (Excel)
Creates a new calculated item. Returns a PivotItem object.
Syntax : expression.Add (Name, Formula, UseStandardFormula)
Dim strName As String: strName =
Dim strFormula As String: strFormula =
Dim pvti As PivotItem
Set pvti = ActiveCell.PivotField.CalculatedItems.Add(Name:=strName, Formula:=strFormula)
Arguments
The following arguments are required:
Name
(String) - The name of the item.
Formula
(String) - The formula for the item.
The following argument is optional
UseStandardFormula
(Boolean) - False (default) for upward compatibility. True for strings contained in any arguments that are item names; will be interpreted as having been formatted in standard U.S. English instead of local settings.