PivotField.TotalLevels (Excel)

Returns the total number of fields in the current field group. If the field isn't grouped, or if the data source is OLAP-based, TotalLevels returns the value 1. Read-only Long.

All fields in a set of grouped fields have the same TotalLevels value.


Dim lngTotalLevels As Long
lngTotalLevels = ActiveCell.PivotField.TotalLevels