I need to create a Macro which can Group the data.
I want to greate Groups in all sheets of the work book where Column B and Column C are NULL.
I found the below which works..i need your help in tweeking the below to fit my requiremnt.
Thanks in advance
Sub grouping()
'-------the following coding is to group subtotal------------------
Dim row As Integer
Dim row2 As Integer
row2 = 3
For row = 3 To 12000
If Sheets("Summary").Cells(row, 1).Font.Bold = True Then
If Not Sheets("Summary").Cells(row, 1).Value = "Grand Total" Then
Sheets("Summary").Rows(row2 & ":" & row - 1).Rows.Group = True
row2 = 0
row2 = row + 1
End If
End If
Next row
End Sub
Bookmarks