Applies To
PivotField Object.
Description
Returns the total number of fields in the current field grouping. If the field is not grouped, TotalLevels returns the value 1. Read-only.
Remarks
All fields in a set of grouped fields have the same TotalLevels value.
Example
This example displays the total number of fields in the group that contains the active cell.
Worksheets("Sheet1").Activate MsgBox "This group has " & _ ActiveCell.PivotField.TotalLevels & " levels."