Share via


PivotItems.Add Method

Excel Developer Reference

Creates a new PivotTable item.

Syntax

expression.Add(Name)

expression   A variable that represents a PivotItems object.

Parameters

Name Required/Optional Data Type Description
Name Required String The name of the new PivotTable item.

Example

This example creates a new PivotTable item in the first PivotTable report on worksheet one.

Visual Basic for Applications
  Worksheets(1).PivotTables(1).PivotItems("Year").Add "1998"

See Also