+ Reply to Thread
Results 1 to 10 of 10

Auto Grouping

  1. #1
    Registered User
    Join Date
    09-28-2018
    Location
    USA
    MS-Off Ver
    1808
    Posts
    10

    Question Auto Grouping

    I have a tab in an excel file that is an out report with multiple sections (vertically stacked). Each of these sections have several blank rows at the bottom of it (just a function of needing space for my index match to pull in new information into the appropriate section as the detailed database is updated.

    Currently I need to group and hid these blank rows at the bottom of each section manually so that the report is presentable without a bunch of blank space. I am hoping to automate this so that excel know which rows to automatically group or ungroup based on the condition of having info in the cell (really would be len>0 since these rows do have fomulas in them but just no text). Regardless, any ideas of how to use auto outline or any other functionality that I am unaware of would be super helpful!
    Last edited by Excel-erate123; 03-03-2020 at 09:10 AM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Auto Grouping

    I cannot post the code. Firewall Issue.

    Place data in column A

    Then Run the Macro Test.
    Attached Files Attached Files
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    09-28-2018
    Location
    USA
    MS-Off Ver
    1808
    Posts
    10

    Re: Auto Grouping

    Thanks for the help with the auto grouping macro. This feels really close but I'm struggling to make it work in my file

    Attached is a cleaned up version of my file. The "Weekly Summary" tab is what I am trying to auto group.

    So essentially all those blank rows that I want hidden (e.g., row 8-12, rows 17-24, 28-37 etc) are not technically blank. Can we update this so its essentially driven off len>0 or something similar. I can also add another column to denote yes/no for which rows that should collapse.

    Thoughts or additional help is appreciated.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-28-2018
    Location
    USA
    MS-Off Ver
    1808
    Posts
    10

    Re: Auto Grouping

    I was thinking a formula like "=SUMPRODUCT(--(LEN(B7)>0))" in each row would return a 1 or 0 and we could use that to drive a collapse macro?? I dont know the first thing about macros so its really appreciated!

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Auto Grouping

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

  6. #6
    Registered User
    Join Date
    09-28-2018
    Location
    USA
    MS-Off Ver
    1808
    Posts
    10

    Re: Auto Grouping

    Thanks much

  7. #7
    Registered User
    Join Date
    02-29-2020
    Location
    Malaysia
    MS-Off Ver
    Office 365
    Posts
    87

    Re: Auto Grouping

    Quote Originally Posted by mehmetcik View Post
    Please Login or Register  to view this content.
    Hi,

    May I know what is the code if i want to Auto Group the entire Column A as well?

  8. #8
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Auto Grouping

    Column A is empty. What would be the point?

  9. #9
    Registered User
    Join Date
    02-29-2020
    Location
    Malaysia
    MS-Off Ver
    Office 365
    Posts
    87

    Re: Auto Grouping

    Quote Originally Posted by mehmetcik View Post
    Column A is empty. What would be the point?
    I know Column A is empty. That's why i want to group the Column A to hide the blank Column A

  10. #10
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Auto Grouping

    Select column A. And Hide it.

+ 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. code for auto grouping columns
    By ids_73 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-25-2017, 11:37 AM
  2. Auto grouping based on cell value
    By famicom in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2014, 11:10 AM
  3. Auto sum/grouping by row based on month
    By witchcraftz in forum Excel General
    Replies: 3
    Last Post: 02-21-2013, 09:03 PM
  4. Auto Grouping of Option Buttons
    By Rafat in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-07-2006, 11:35 AM
  5. VBA: Auto Grouping
    By choo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2006, 10:45 AM
  6. Auto Filter and Grouping
    By Dan Foxley in forum Excel General
    Replies: 1
    Last Post: 06-06-2005, 07:05 PM

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