Grouping Rows or Columns

Grouping Rows or Columns


(Columns)

[sourcecode language=”vb” light=”true” wraplines=”false” gutter=”false”]
Columns("E:G").Select
Selection.Columns.group
[/sourcecode]


(Rows)

[sourcecode language=”vb” light=”true” wraplines=”false” gutter=”false”]
Range("2:20").Select
Selection.Rows.group
[/sourcecode]


Hiding Grouped Itmes

[sourcecode language=”vb” light=”true” wraplines=”false” gutter=”false”]
ActiveSheet.Outline.ShowLevels ColumnLevels:=1 ‘hides grouped items
[/sourcecode]