+ Reply to Thread
Results 1 to 2 of 2

Macro for grouping & consecutively numbering groups

  1. #1
    Registered User
    Join Date
    06-05-2008
    Posts
    1

    Macro for grouping & consecutively numbering groups

    Good Day-

    I'd like to write a macro that will group a long list of data I have, then consecutively number the groups. Not all the groups contain the same number of rows, but they do follow a pattern. For example:

    The first 165 rows = "1"
    Next 165 rows = "2"
    Next 133 rows = "3"

    Then there are 6 more groups of 165, a group of 133, then 2 more groups of 165.

    Then the entire segment repeats.

    I may have to compile this list several times, so I'd prefer to avoid doing it manually if I can.

    Any help would be greatly appreciated!

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    Try this macro

    Please Login or Register  to view this content.
    You can adjust the values of the three variables at the top as appropriate.
    Martin

+ 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 to create a macro?
    By jojotherider in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2008, 08:34 PM
  2. Sequential Numbering Macro
    By stedia in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-18-2007, 01:10 PM
  3. country finder lookup macro
    By theghost in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-07-2007, 10:41 PM
  4. Make Called Macro End the First Macro
    By carsto in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-07-2007, 11:38 AM
  5. Help with a Macro (MS Word)
    By Push Latency in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-27-2006, 01:37 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