+ Reply to Thread
Results 1 to 7 of 7

Renaming Worksheet from value in a cell

  1. #1
    Forum Contributor
    Join Date
    07-25-2008
    Location
    texas
    Posts
    178

    Renaming Worksheet from value in a cell

    I have a workbook with 100 worksheets named (1 - 100). I would like to run a single macro to rename each worksheet from the contents of its Cell B3.


    Thanks
    Last edited by jartzh; 07-20-2010 at 02:18 PM.

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

    Re: Renaming Worksheet from value in a cell

    Hi Jartzh, perhaps,

    Please Login or Register  to view this content.
    Note, that this will generate an error if any of the B3 cells contain identical values, or if any of them contain invalide sheet name characters such as [ ] / \ ? :

  3. #3
    Forum Contributor
    Join Date
    07-25-2008
    Location
    texas
    Posts
    178

    Re: Renaming Worksheet from value in a cell

    Paul,
    I get a msg saying the value of the worksheet will be invalid. I think there are unprintable chars in the cell. How can I strip out the first 6 chars for the name. I tried to add a Left function to your code but it yellowed out.

    Thanks

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

    Re: Renaming Worksheet from value in a cell

    If you want to KEEP the first six characters and make that the sheet name, use:

    Please Login or Register  to view this content.
    If you want to get rid of the first six characters, use:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-25-2008
    Location
    texas
    Posts
    178

    Re: Renaming Worksheet from value in a cell

    Paul,
    You are the man!

    Works like a champ.

    Thanks,

  6. #6
    Registered User
    Join Date
    08-28-2012
    Location
    NY, NY
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Renaming Worksheet from value in a cell

    Hey Paul,

    How would I do this if instead of a copying a value from Cell B3, i were copying a String.

    For example, I want to rename each of the tabs a different ticker symbol. Each of these are already in the worksheets cell B3.

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Renaming Worksheet from value in a cell

    Hello rhino54, and welcome to the forum.

    Unfortunately you have inadvertently broken one of the forum rules. Please read the following and make the necessary change. Thanks.

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.

+ 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