Calculated Fields
You can use the CalculatedFields collection of the PivotTable object to add a new calculated field.
Once created it is treated the same as any other field.
Set objPivotTable = ActiveSheet.PivotTables("PivotTable1")
objPivotTable.CalculatedFields.Add "Name", "=formula"
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext