Results 1 to 2 of 2

Group/Ungroup using a Macro

Threaded View

  1. #1
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Group/Ungroup using a Macro

    Is there a way to Group/Ungroup specific columns using a macro? I want to be able to Group/Ungroup several different column groups (see attached).

    There are two problems, firstly I don't want the gaps between the groups, i.e. I don't want columns D, I and L but without them it is not possible to group in this way because it will just make a single group rather than multiple groups.

    Secondly I would want a different keyboard shortcut for each group so I can be specific about which group to show/hide?

    If this is not possible would a better alternative be to simply achieve the same thing using Hide/Unhide? If so, is it possible to achieve the Hide/Unhide by clicking on a particular cell, in the sample attached perhaps double clicking on A1 to hide Group 1, E1 to hide Group 2 and so on. I'm not sure how Unhide would then work, so maybe a toggle would be better, say Ctrl J toggles Group 1 on and off and then Ctrl M toggles Group 2 on and off. Buttons on the page won't really work owing to the size of the main sheet.

    Unsure if this is even possible...

    Many thanks
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. macro to ungroup/group certain columns and adding to a cell or button
    By sluggerish in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-02-2014, 01:30 PM
  2. Macro to Group/Ungroup a specific Table plus macro to expand/Collapse grouped table.
    By Michell Feitosa in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-04-2012, 08:10 PM
  3. Group/Ungroup
    By rz6657 in forum Excel General
    Replies: 1
    Last Post: 03-26-2009, 02:55 AM
  4. Group and Ungroup Macro
    By caliskier in forum Excel General
    Replies: 2
    Last Post: 09-20-2007, 02:31 PM
  5. Help with Group/Ungroup
    By deacs in forum Excel General
    Replies: 3
    Last Post: 01-30-2006, 12:30 PM

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