Reputation: 613
In excel vba I can group rows in a worksheet using
NewSheet.rows("15:22").Group
But how can I determine which rows are already grouped in a worksheet?
Upvotes: 2
Views: 8012
Reputation: 33692
Use the code below to scan all rows with data in "NewSheet", and check per row if it's already grouped.
' scan all rows in your sheet
For i = 2 To lastRow
' check isf current row is grouped
If NewSheet.Rows(i).OutlineLevel > 1 Then
' do something
End If
Next i
Upvotes: 3