Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This code will go through the used range and do the grouping for the cells
with IndentLevels that are even. However, for IndentLevels that are odd, there is no grouping. I tried a double-loop, like For i€¦Next i and For j€¦Next j, but that didnt work. Sub Grp() Dim lngRow As Long Sheets("Sheet1").Select For i = 12 To 0 Step -2 For lngRow = Cells(Rows.Count, "B").End(xlUp).Row To 2 Step -1 If Range("B" & lngRow) < "" And Range("B" & lngRow).IndentLevel = (i) Then Range("B" & lngRow).Rows.Group End If Next lngRow Next i End Sub What do I need to do to make this group both even Indents and odd Indents? Thanks, Ryan--- P.S., sorry for that other post...not sure how THAT happened... -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Looping question | Excel Programming | |||
A looping question | Excel Programming | |||
Looping Question | Excel Programming | |||
looping question | New Users to Excel | |||
Looping Question? | Excel Programming |