PDA

View Full Version : Pivot Table Calculated Field



joprotus
09-02-2007, 02:28 AM
How can I add calculated field in a pivot table at run time? Is it possible to use the sub-total field in the calculated field formula? :hi:

rory
09-03-2007, 05:51 AM
You would use something like:

Worksheets(1).PivotTables(1).CalculatedFields.Add "PxS", _ "= Product * Sales"

Calculated fields work at an aggregate level.

joprotus
09-05-2007, 12:35 AM
Thanks rory. This helps.