+ Reply to Thread
Results 1 to 3 of 3

Grouping function in Excel macro

  1. #1
    Registered User
    Join Date
    09-19-2007
    Posts
    5

    Grouping function in Excel macro

    Hi everyone. It's my first post to this forum so I'd like to say hello.

    Could You give me a tip?
    In Excel menu->Data->Groups And Conspects->Group option is located. How can I achieve the same effect from VBA code?

    Greetings. P.
    Last edited by VBA Noob; 09-19-2007 at 04:41 AM.

  2. #2
    Registered User
    Join Date
    10-25-2006
    Posts
    54
    Tools>macro>record new macro and then look at the code produced for you.

    Always a good place to start when you're not sure how to do something.

    Is this what you're after?

    Range("A1:B14").Select
    Selection.Rows.Group

    A

  3. #3
    Registered User
    Join Date
    09-19-2007
    Posts
    5
    Yes, that's great! But there is a small problem.

    I need my group to be rolled up after grouping. When I record it, the code appears but except action of rolling up



    PS. Is there some possibility to chech sth like this:
    If (some range is grouped) Then (someaction) ?
    Last edited by bobens_83; 09-19-2007 at 09:18 AM.

+ Reply to 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