+ Reply to Thread
Results 1 to 9 of 9

How to add a number sequence to spreadsheet

  1. #1
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    How to add a number sequence to spreadsheet

    I'm trying to add a number sequence to my spreadsheet but I have over 20,000 lines to add this to. Is there an easy way to do this. See my example below:

    '00000001
    '00000001
    '00000002
    '00000002
    '00000003
    '00000003

    I need it to continue to line 20,000. This is the break that our accounting software recognizes as the start of a new entry.
    Every two lines have the same number, then the next two, it can be random numbers but has to be different from any two lines in the sheet.
    Please advise. Thanks.
    Last edited by Mile029; 01-06-2012 at 02:55 PM.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: How to add a number sequence to spreadsheet

    It's really important to let us know which version of Excel you are using so we can give accurate instructions.

    With Excel 2010
    Try this
    A1: '00000001
    • Select A1:A20000
    • Home.Fill.Series...Check:AutoFill
    • Click: OK

    That should do it....Does it?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    Re: How to add a number sequence to spreadsheet

    Sorry Ron, I thought I had set that up when I registered, I'm using Excel 2003.

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: How to add a number sequence to spreadsheet

    Quote Originally Posted by Mile029 View Post
    Sorry Ron, I thought I had set that up when I registered, I'm using Excel 2003.
    Ok...For Excel 2003:
    A1: '00000001
    • Select A1:A20000
    • Edit.Fill.Series....ChecK: AutoFill...Click: OK

    Does that help?

  5. #5
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    Re: How to add a number sequence to spreadsheet

    Also, I need the numbers to be repeating every two lines, so it would be as follows:

    A1: '00000001
    A2: '00000001
    A3: '00000002
    A4: '00000002
    A5: '00000003
    A6: '00000003

    and so on 4 , 5 , 6 ....

    Autofill only numbers sequentially like as follow:

    A1: '00000001
    A2: '00000002
    A3: '00000003
    A4: '00000004

    I need it repeat every two lines, if you need to upload a spreadsheet to explain I can. thanks.

  6. #6
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    Re: How to add a number sequence to spreadsheet

    If I do the above for for Excel 2003 autofill, it just repeats the series. meaning the following:


    A1: '00000001
    A2: '00000001
    A3: '00000002
    A4: '00000002
    A5: '00000003
    A6: '00000003
    A8: '00000001
    A9: '00000001
    A10: '00000002
    A11: '00000002
    A12: '00000003
    A13: '00000003

    does not create a new '00000004 in A8 and A9 and then '00000005 in A10 and A11 and so on and so on....

  7. #7
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: How to add a number sequence to spreadsheet

    Sorry...My mistake. I didn't notice the repeats

    Try this
    A1: '00000001
    A2: '00000001

    Please Login or Register  to view this content.
    Copy that formula down as far as you need.

    Then, if needed
    • Copy the range of formulas and Edit.Paste_Special.Values over themselves.
    • Change the number format of those cells to TEXT (So they won't convert to numbers if you edit them)


    does that help?

  8. #8
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    Re: How to add a number sequence to spreadsheet

    Yes, that works awesome, I knew it had to be simple, I was over-thinking it. Thanks Ron!

  9. #9
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,452

    Re: How to add a number sequence to spreadsheet

    Try this:
    * Type 1 in A1
    * In A2:
    Please Login or Register  to view this content.
    Copy till line 2000
    * Highline A1:A2000,Format Cells.Number.Custom.Type: 000000
    Hope this help

+ 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