+ Reply to Thread
Results 1 to 3 of 3

HELP! Macro to Outline and Group my Data

  1. #1
    Registered User
    Join Date
    04-15-2014
    Location
    Nottingham
    MS-Off Ver
    Excel 2003
    Posts
    1

    HELP! Macro to Outline and Group my Data

    Hi - I'm new to Macros/VBA, but I need to get my data to automatically outline, by finding all blank cells and grouping them under the non blank above - i.e.
    A1 Claire
    A2 (blank)
    A3 (blank)
    A4 (blank)
    A5 Andrew
    A6 (blank)
    A7 (blank)
    A8 (blank)


    I would like A2:A4 to be grouped together under A1, and A6:A8 to be grouped under A5
    Any suggestions would be very useful - annotations in the code would be extremely helpful also so I can understand what each part is doing
    Many thanks
    claire

  2. #2
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: HELP! Macro to Outline and Group my Data

    Hi Claire,

    Welcome to the forum

    You could just use a sort command.
    The code below will take the data in the A column and arrange it to have the blanks below the non blanks.
    Of course this is code to work on your simplified example, but can be extended for larger blocks of data.

    Please Login or Register  to view this content.
    Regards,
    Rudi

  3. #3
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: HELP! Macro to Outline and Group my Data

    Actually I misunderstood you.
    I'll work on a macro to "outline" the blanks ....

    Here is the new macro.
    Please note it is designed ONLY to work with blanks between the cells with values in them.

    Please Login or Register  to view this content.
    Last edited by RudiS; 04-15-2014 at 03:17 PM.

+ 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. Macro button to xxpand AND collapse Group (Outline)
    By dchubbock in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-12-2012, 07:34 PM
  2. Macro to "Auto Outline" (Group)
    By excelpuppy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-16-2011, 07:58 PM
  3. Group and Outline
    By mimikli in forum Excel General
    Replies: 2
    Last Post: 03-17-2010, 05:10 PM
  4. Group and Outline
    By naturallight in forum Excel General
    Replies: 1
    Last Post: 02-09-2010, 05:02 PM
  5. Data And Group Outline
    By Steved in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-03-2006, 06:40 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