AddFields Method Example

This example replaces the existing column fields in the first PivotTable report on Sheet1 with the Status and Closed_By fields.

Worksheets("Sheet1").PivotTables(1).AddFields _
    ColumnFields:=Array("Status", "Closed_By")