PivotItems.Add Method (Excel)
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.
Worksheets(1).PivotTables(1).PivotItems("Year").Add "1998"