Closed Thread
Results 1 to 3 of 3

Creating Groups

  1. #1
    Registered User
    Join Date
    06-12-2009
    Location
    Houston
    MS-Off Ver
    Excel 2003
    Posts
    1

    Creating Groups

    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

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Creating Groups

    Please take a few minutes to read the forum rules, and then edit your post to add code tags.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Creating Groups

    Thread closed.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1