+ Reply to Thread
Results 1 to 6 of 6

Count Sequential Numbers

  1. #1
    Registered User
    Join Date
    06-06-2012
    Location
    ATLANTA, GA
    MS-Off Ver
    Excel 2003
    Posts
    11

    Count Sequential Numbers

    Hello. I need either a formula or VBA that will count sequential numbers within a column of about 3,000. I would like the count of the sequence to be placed in the cell to the right of the last number in the sequence.

    It should look something like this:

    1
    2
    3
    4
    5 (5)

    13
    14
    15
    16 (4)


    27
    28
    29
    30
    31
    32
    33(7)

    etc.

    I have attached a spreadsheet with the basic layout of 1,000 cells. Each new sequence is designated by color (Don't worry about the red, that's more for my understanding). If anyone could help, I would greatly appreciate it.
    Attached Files Attached Files

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Count Sequential Numbers

    AJRIGNEY,

    Formula solution requires headers. Attached is a modified version of your posted example file.
    In cell B2 and copied down:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    06-06-2012
    Location
    ATLANTA, GA
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Count Sequential Numbers

    Leaving work right now, but I will plug in that formula tomorrow. Seems like it should work. Thanks so much!

  4. #4
    Registered User
    Join Date
    06-06-2012
    Location
    ATLANTA, GA
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Count Sequential Numbers

    Quick Question. What do you mean by the formula solution requiring headers (Only been doing excel for about two weeks now)? I tried inserting the formula and adjusting it to my formatting, it messed up the numbers, changing the number by the number of rows I added. I shifted down everything by 9 cells, left the time in column A, but moved the count over to column I

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Count Sequential Numbers

    A header is a line of text in the row immediately above where the data starts that indicates what's in the column. So if your data starts in A9, then in A8 you should have a header labelled "Time" or "Timestamp", basically a short descriptive word or two for what the column contains. Then, in the column where the formula will be (for example if your data starts in A9, then the formula should go in B9), the cell immediately above the where the formula starts (so B8) should be a header for the formula, something like "Count" or "Consecutive Count", etc.

    The example file i posted contains headers and the formula. You should be able to adapt what's in there to your data. If you are still having issues, please post a more accurate example file so I can show you how to apply the formula to it.

  6. #6
    Registered User
    Join Date
    06-06-2012
    Location
    ATLANTA, GA
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Count Sequential Numbers

    I figured it out. Thanks for your help, brother.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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