PIVOT.ADD.FIELDS

Macro Sheets Only

Add fields onto a PivotTable.

Syntax

PIVOT.ADD.FIELDS(name, row_array, column_array, page_array, add_to_table)

Name is the name of the PivotTable to which the user wants to add fields. If name is omitted, Microsoft Excel will use the PivotTable containing the active cell.

Row_array is an array of text constants consisting of the names of the fields which the user would like to add to the PivotTable as Row Fields.

Column_array is an array of text constants consisting of the names of the fields which the user would like to add to the PivotTable as Column Fields.

Page_array is an array of text constants consisting of the names of the fields which the user would like to add to the PivotTable as Page Fields.

Add_to_table is a logical value which if TRUE adds the fields specified by row_array, column_array and page_array to the exisiting fields on the PivotTable. If add_bool is FALSE, Microsoft Excel will replace the fields already along the rows, columns and pages with the fields specified by row_array, column_array and page_array.

Remarks

If name is not a valid PivotTable name, then the #VALUE! error value is returned.

Related Functions

PIVOT.ADD.DATA Adds a field to a PivotTable as a Data Field

PIVOT.FIELD Pivots fields within a PivotTable

PIVOT.FIELD.GROUP Creates groups within a PivotTable

PIVOT.FIELD.PROPERTIES Changes the properties of a field inside a PivotTable

PIVOT.FIELD.UNGROUP Ungroups all selected groups within a PivotTable

PIVOT.ITEM Moves an item within a PivotTable

PIVOT.ITEM.PROPERTIES Changes the properties of an item within a header field

PIVOT.REFRESH Refreshes a PivotTable

PIVOT.SHOW.PAGES Creates new sheets in the workbook containing the active cell

PIVOT.TABLE.WIZARD Creates an empty PivotTable

List of Command-Equivalent Functions