Syntax

expression.GroupLevel

expression A variable that represents a PivotField object.

Remarks

This property is not available for OLAP data sources.

The highest-level parent field (leftmost parent field) is level one, its child is level two, and so on.

Example

This example displays a message box if the field that contains the active cell is the highest-level parent field.

Visual Basic for Applications
Worksheets("Sheet1").Activate If ActiveCell.PivotField.GroupLevel = 1 Then MsgBox "This is the highest-level parent field." End If
Determine the group level of a specific cell in a pivot table? group group level Group Level Property grouplevel GroupLevel Property

See also: