+ Reply to Thread
Results 1 to 7 of 7

Re-Name Worksheets w/ Macro?

  1. #1
    Registered User
    Join Date
    09-16-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re-Name Worksheets w/ Macro?

    I need to rename 200 worksheets according to data in column A. The data is sequential, for the most part, and contains 25054, 25055, 25056, etc. How can I easily rename the worksheets without naming each manually?

    Thank you.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Re-Name Worksheets w/ Macro?

    Hi, samuelabyrd,

    do you have one cell showing the new number or is it a range in which these names are to be found?

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    09-16-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Re-Name Worksheets w/ Macro?

    It is a range. The names are in column A, A5:A218. I think I should use the 2nd of the two codes offered, but I'm not sure how to properly format the information that needs to go in the line starting with "ws.Name".

    Thank you.

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Re-Name Worksheets w/ Macro?

    Hi, samuelabyrd,

    and then: range on one special sheet or on any? The Index of a Worksheet will always start with 1, so we need to add at least 4 to the Index to match the range.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Ciao,
    Holger

  5. #5
    Registered User
    Join Date
    09-16-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Re-Name Worksheets w/ Macro?

    Hi Holger,

    Yes the range of information is on a worksheet titled "House Codes".

    When I run it, is says, "Check the value in cell 'A5' please." The value in the cell is a numeric text entry, 25045 in this case.

    Thank you.
    Last edited by samuelabyrd; 07-20-2013 at 10:43 AM.

  6. #6
    Registered User
    Join Date
    09-16-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Re-Name Worksheets w/ Macro?

    Any other ideas?

  7. #7
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Re-Name Worksheets w/ Macro?

    Hi, samuelabyrd,

    maybe itīs that the sheet with the codes is renamed and thus not found any more.

    Please give the updated version a try:
    Please Login or Register  to view this content.
    Ciao,
    Holger

+ 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 that reads a list of worksheets, selects the sheets and performs a macro
    By JohnPellerin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-05-2013, 05:04 AM
  2. Replies: 8
    Last Post: 04-21-2013, 01:58 AM
  3. Replies: 0
    Last Post: 03-28-2013, 10:25 AM
  4. VBA / Macro for creating new worksheets and new columns from existing worksheets
    By webby2006 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2006, 10:38 AM
  5. Problem in updating all worksheets of a workbook using a macro that calls another macro
    By saai_ram@yahoo.com in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-20-2006, 01:25 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