PivotTable.CalculatedFields method (Excel)

Returns a CalculatedFields collection that represents all the calculated fields in the specified PivotTable report. Read-only.

Syntax

expression.CalculatedFields

expression A variable that represents a PivotTable object.

Return value

CalculatedFields

Example

This example prevents the calculated fields from being dragged to the row position.

For Each fld in _ 
 Worksheets(1).PivotTables("Pivot1") _ 
 .CalculatedFields 
 fld.DragToRow = False 
Next

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.