+ Reply to Thread
Results 1 to 10 of 10

Auto Numbering Worksheets

  1. #1
    Registered User
    Join Date
    07-05-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    21

    Auto Numbering Worksheets

    I've created a workbook where I will have to copy one worksheet 25 times and each one will be numbered. My first worksheet will be numbered 1000 for example, when I copy that worksheet is there function that would automatically number the next worksheet 1001 and so on to 1025? Thank you for your help.

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

    Re: Auto Numbering Worksheets

    Hi DLee,

    How about just using a macro to do the work for you? See below.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-05-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Auto Numbering Worksheets

    Thank you, I copied this macro to my worksheet but when I copy try to copy the worksheet the number doesn't change. Clicking "run" I get a message "Subscript out of Range".

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

    Re: Auto Numbering Worksheets

    My guess is you either don't have a sheet named 1000, or you already have one or more sheets named 1001 through 1025.

  5. #5
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    Re: Auto Numbering Worksheets

    are there any sheets in the workbook called 1001, 1002...etc already?

    how many sheets are in this workbook?

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,837

    Re: Auto Numbering Worksheets

    A macro like Paul is suggesting will be the most flexible method.

    Here's a non-macro strategy I use that works pretty well for copying sheets.

    You've probably noticed that if you copy a sheet named "sheet1", the copy is named "sheet1 (2)". If you copy it again, you get a "sheet1 (3)". Recognizing the pattern, for sheets that I want to increment with each copy, I started including the parentheses ["(1)"] in the first copy of the sheet. So, in your case, I might start with a sheet named "(1000)". When copied, the copy will automatically be called "(1001)", then "(1002)", then "(1003)", and so on. Or maybe "sheet(1)" which copies to "sheet(2)" which copies to "sheet(3)" and so on. If you can tolerate the presence of the parantheses and you are using the copy worksheet command, this might be a simple way to get the autoincrement that you are asking for.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  7. #7
    Registered User
    Join Date
    07-05-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Auto Numbering Worksheets

    I start out with one sheet, the actual starting number is 10476. (1000 was just an example).

  8. #8
    Registered User
    Join Date
    07-05-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Auto Numbering Worksheets

    There is only one sheet and I would like 25.

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

    Re: Auto Numbering Worksheets

    I created a new workbook and deleted all worksheets except Sheet1. I changed the name of Sheet1 to 10476. I right-clicked that sheet tab and chose View Code. I pasted the following code into the VBA Editor and ran it. 25 new sheets were created in sequential numerical order as expected.
    Please Login or Register  to view this content.
    The only difference between this code and my original code is that I changed 1000 to 10476 in both places.

  10. #10
    Registered User
    Join Date
    07-05-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Auto Numbering Worksheets

    Thank you Paul, this time it worked.

+ 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. weird (auto numbering) numbering ....
    By freestone in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-20-2010, 07:46 PM
  2. Possible to do auto-numbering after auto filtering?
    By hello_lpc in forum Excel General
    Replies: 1
    Last Post: 11-10-2009, 03:18 AM
  3. WBS numbering help, auto numbering with indenture
    By hisham2929 in forum Excel General
    Replies: 2
    Last Post: 02-18-2007, 06:59 PM
  4. help with auto numbering
    By aecon in forum Excel General
    Replies: 1
    Last Post: 10-28-2005, 01:05 PM
  5. [SOLVED] Auto page numbering for several worksheets
    By Andy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-13-2005, 01:07 AM

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