Automatic Grouping automatically creates hierarchical cell groups on the basis of cell style.
Automatic Grouping varies in its treatment of different kinds of cells. Input cells, for example, form groups automatically only when followed by Output cells. Graphics cells form groups automatically only when followed by other Graphics cells.
The grouping behavior of cells is controlled by the CellGroupingRules option.
Any groups you have created manually will be ignored when Automatic Grouping is selected.
This command sets the option CellGrouping Automatic on the selected notebook.
See Reference Guide: CellGrouping.