+ Reply to Thread
Results 1 to 5 of 5

Nested grouping of rows using vba in excel

  1. #1
    Registered User
    Join Date
    11-10-2020
    Location
    Jaipur, India
    MS-Off Ver
    365
    Posts
    3

    Question Nested grouping of rows using vba in excel

    Hi all, I need help with nested grouping of rows using macros. My macro currently is able to just group at a single level and it takes a long time as I have 50,000+ rows. I would like to group 2 levels. I have attached a file with original data set, current output using my macro and expected output. Appreciate all the help I can get, thank you in advance.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    06-23-2021
    Location
    Romania
    MS-Off Ver
    2021, 365 v 2208
    Posts
    722

    Re: Nested grouping of rows using vba in excel

    Maybe this?
    HTML Code: 
    Diana Tanase


    If the solutions offered helped you to solve your problem, then mark the thread as SOLVED (thread tools in the top menu) and you can click on * to add reputation to those who helped you, as a way to say thank you !

  3. #3
    Registered User
    Join Date
    11-10-2020
    Location
    Jaipur, India
    MS-Off Ver
    365
    Posts
    3

    Question Re: Nested grouping of rows using vba in excel

    I tried the below code but it isn't nesting the groups as expected. I also switched the blocks (Column C grouping on top and Column B grouping below) but it isn;t working right.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,256

    Re: Nested grouping of rows using vba in excel

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. I have done it for you today.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    11-10-2020
    Location
    Jaipur, India
    MS-Off Ver
    365
    Posts
    3

    Re: Nested grouping of rows using vba in excel

    Ok, will keep that in mind. Thanks Ali

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Grouping rows by criteria excel vba
    By pmxpo in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 06-14-2020, 04:09 AM
  2. Grouping Rows
    By jambo2013 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-12-2014, 11:23 AM
  3. Excel 2010 - grouping rows
    By frankhov1n in forum Excel General
    Replies: 2
    Last Post: 03-25-2014, 07:55 AM
  4. Excel 2010 VBA Help: Grouping Rows by text in A Column.
    By tiahuana in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-24-2013, 12:13 PM
  5. Excel Macro to Group by bold subtotal rows (multiple levels of grouping)
    By aozorap in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2013, 03:13 PM
  6. Grouping the rows
    By olga6542 in forum Excel General
    Replies: 3
    Last Post: 04-18-2011, 12:12 PM
  7. grouping rows in excel 2000
    By ratfink in forum Excel General
    Replies: 3
    Last Post: 10-10-2008, 11:02 AM

Tags for this Thread

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