PivotTable.CalculatedFields Method (Excel)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

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

expression .CalculatedFields

expression A variable that represents a PivotTable object.

Return Value

CalculatedFields

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
Show: