Add Method (PivotFormulas Collection)

Applies To

PivotFormulas collection object.

Description

Creates a new pivot formula. Returns a PivotFormula object.

Syntax

object.Add(Formula)

object Required. An expression that returns a PivotFormulas object.

Formula Required String. The new pivot formula.

Example

This example creates a new pivot formula.

Worksheets(1).PivotTables(1).PivotFormulas _
    .Add "Year['1998'] Apples = (Year['1997'] Apples) * 2"