Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub WhichWay()
Dim rng As Range Set rng = Selection If rng.Columns.Count = Columns.Count Then rng.Group MsgBox "Entire Rows Grouped" & vbCr & rng.Address ElseIf rng.Rows.Count = Rows.Count Then rng.Group MsgBox "Entire Columns Grouped" & vbCr & rng.Address Else MsgBox "Not entire rows or columns " & vbCr & _ "However let's group rows. " & vbCr & rng.Address rng.EntireRow.Group MsgBox "Rows grouped for... " & vbCr & rng.Address End If rng.EntireRow.ClearOutline End Sub -- Jim Cone Portland, Oregon USA "Nick Junod" wrote in message What I mean by a grouped selection is the same thing as under the Data menu | Group and Outline | Group. Does that help? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Range.Group Method - group rows, not columns | Excel Programming | |||
Group and ungroup | Excel Programming | |||
Use VBA to find, Group, Ungroup rows | Excel Programming | |||
On protected Excel sheet users be able to group/ungroup rows/colum | Excel Worksheet Functions | |||
how do you group and ungroup rows or columns in new Excel? | Excel Worksheet Functions |