Skip to content

Latest commit

 

History

History
145 lines (123 loc) · 6.06 KB

Excel.PivotField.md

File metadata and controls

145 lines (123 loc) · 6.06 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
PivotField object (Excel)
vbaxl10.chm239072
vbaxl10.chm239072
Excel.PivotField
52784960-e2da-b43a-1e37-2d4dae61c6d8
03/30/2019
medium

PivotField object (Excel)

Represents a field in a PivotTable report.

Remarks

The PivotField object is a member of the PivotFields collection. The PivotFields collection contains all the fields in a PivotTable report, including hidden fields.

In some cases, it may be easier to use one of the properties that returns a subset of the PivotTable fields. The following properties are available:

Example

Use PivotFields (index), where index is the field name or index number, to return a single PivotField object.

The following example makes the Year field a row field in the first PivotTable report on Sheet3.

Worksheets("sheet3").PivotTables(1) _ 
 .PivotFields("year").Orientation = xlRowField

Methods

Properties

See also

[!includeSupport and feedback]