+ Reply to Thread
Results 1 to 5 of 5

Name Worksheet According to Cell Value?

  1. #1
    Registered User
    Join Date
    10-18-2010
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2007
    Posts
    47

    Name Worksheet According to Cell Value?

    Hello. I am wondering why all advice online regarding how to name a worksheet based on a cell value is not working for me? I am trying to write a macro that, when run, cycles through every worksheet in my workbook and names each sheet whatever the value in merged cell P3:S3 is. This value is always a five digit number. Does anyone have any idea where I may be going wrong with this? I have tried at least ten codes from various sources and gotten a a multitude of errors. I think it may be because the value is a number? Very new to VBA.

    Thank you!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Name Worksheet According to Cell Value?

    Hello kristy,

    There is no rule against naming worksheets as numbers. You should post the code you using for review.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    10-18-2010
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: Name Worksheet According to Cell Value?

    Currently I do not have one as I haven't been able to make anything work. I have tried the following:

    Please Login or Register  to view this content.
    This one from dailydoseofexcel.com (adjusted range to match mine):
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    There were others I tried; these are some of them. All of them produced an error message. Thank you for your help.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Name Worksheet According to Cell Value?

    Hello Kristy,

    By any chance is the worksheet protected? If so, it must be unprotected before the name can be changed.

  5. #5
    Registered User
    Join Date
    10-18-2010
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: Name Worksheet According to Cell Value?

    The sheet is not protected.

+ 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