Ungroup Method

Applies To

DrawingObjects Collection, GroupObject Object, GroupObjects Collection, Range Object.

Description

Range object: Promotes a range in an outline level (in other words, decreases its outline level). The specified range must be a row or column, or a range of rows or columns. If the range is in a PivotTable, ungroups the items contained in the range.

GroupObject: Ungroups a group of drawing objects. Returns a DrawingObjects collection containing the objects in the group.

Syntax

object.Ungroup

object

Required. The object to which this method applies.

Remarks

If the active cell is in a field header of a parent field, all the groups in that field are ungrouped and the field is removed from the PivotTable. When the last group in a parent field is ungrouped, the entire field is removed from the PivotTable.

See Also

Group Method, OutlineLevel Property.

Example

This example ungroups drawing object group one on Sheet1.


Worksheets("Sheet1").GroupObjects(1).Ungroup

This example ungroups the field named "ORDER_DATE."


Set pvtTable = Worksheets("Sheet1").Range("A3").PivotTable
Set groupRange = pvtTable.PivotFields("ORDER_DATE").DataRange
groupRange.Cells(1).Ungroup