Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Grouping Rows (03)

    Sheet 1 has various rows grouped together. I would like to have the same rows grouped on Sheet 2. I am not familiar with the row grouping in VBA.

    Thanks for your assistance.
    John

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Grouping Rows (03)

    What exactly do you mean by 'grouped together'? Do you have subtotals or an outline? Or ...?

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Grouping Rows (03)

    Hans,

    There are no sub-totals involved. It is just various rows grouped throughout the worksheet.

    Regards,
    John

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Grouping Rows (03)

    You can group rows in code like this:

    Range("A3:A5").Rows.Group

    or

    Selection.Rows.Group

    As is to be expected, Ungroup will undo the grouping.

    If you want to synchronize the grouping on two sheets, I'd recommend not using the menu to group, but using code to do so. You can then set the same grouping on the other sheet:

    Selection.Rows.Group
    Sheets("OtherSheet").Range(Selection.Address).Rows .Group

Posting Permissions

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