Add Method (PivotItems Collection)

Applies To

PivotItems collection object.

Description

Creates a new pivot item. Returns a PivotItem object.

Syntax

object.Add(Name)

object Required. An expression that returns a PivotFormulas object.

Name Required String. The name of the new pivot item.

Example

This example creates a new pivot item.

Worksheets(1).PivotTables(1).PivotFields("Year").Add "1998"