+ Reply to Thread
Results 1 to 7 of 7

make an existing non Consecutive column of numbers to be Consecutive

  1. #1
    Registered User
    Join Date
    03-13-2010
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    6

    make an existing non Consecutive column of numbers to be Consecutive

    I have an existing non Consecutive column of numbers that I need to make Consecutive. How do I insert the missing numbers in additional rows while preserving the other columns of data that go with the already existing rows? Below is a small example.
    The numbers in the right column are the ones I want to make consecutive.

    F-1366 763481
    P-2464 763484
    PD-1310 764416

    Thanks very much.

  2. #2
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: make an existing non Consecutive column of numbers to be Consecutive

    could you please attach a workbook with about 10 lines of data?
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  3. #3
    Forum Moderator Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,802

    Re: make an existing non Consecutive column of numbers to be Consecutive

    And what do you want to happen to the values in the left column? Repeat? Blank? In your small sample, would you expect to see the following as the result:

    F-1366 763481
    F-1366 763482
    F-1366 763483
    P-2464 763484
    P-2464 763485
    P-2464 763486
    P-2464 763487
    P-2464 763488
    .
    .
    .
    P-2464 764414
    P-2464 764415
    PD-1310 764416

    ?

  4. #4
    Registered User
    Join Date
    03-13-2010
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: make an existing non Consecutive column of numbers to be Consecutive

    Quote Originally Posted by DGagnon View Post
    could you please attach a workbook with about 10 lines of data?
    I have attached a small sample. and as ask by another person, I want the left column of extra rows to be blank.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-13-2010
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: make an existing non Consecutive column of numbers to be Consecutive

    I would like the left column of extra rows to be blank.

    Thanks Paul

  6. #6
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: make an existing non Consecutive column of numbers to be Consecutive

    This macro should do the trick for you

    Please Login or Register  to view this content.
    but one note is that there are 931 rows that will be added between your last and second last entry.
    Last edited by DGagnon; 03-23-2012 at 05:56 PM.

  7. #7
    Forum Moderator Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,802

    Re: make an existing non Consecutive column of numbers to be Consecutive

    Another option, without looping through every cell (inserting a range of rows and filling via series):
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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