+ Reply to Thread
Results 1 to 4 of 4

Renaming worksheet question

  1. #1
    Registered User
    Join Date
    04-01-2004
    Posts
    20

    Renaming worksheet question

    I have a workbook that has multiple worksheets. What i would like to do is rename Sheet2 to a name based on the value from a cell from Sheet1. In addition to that i would also like the 2nd half of the name a fixed value. For example If cell A1 in Sheet1 is changed to A12345 i would like Sheet2 to be renamed to "A12345-George" where the "George" part is fixed. All the other worksheets will follow the same naming convention for the prefix, however the suffix will have a different name. So Sheet3 will be "A12345-Sally" and Sheet4 will be "A12345-Jane" so on and so forth.

    I used the search function and found some similar topics but like mine they were all very user specific.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    This identifys sheets by their code name. (It assumes < 10 sheets)
    As part of a Worksheet_Change event, each sheet's name will be linked to its cell A1.

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    04-01-2004
    Posts
    20
    Quote Originally Posted by mikerickson
    This identifys sheets by their code name. (It assumes < 10 sheets)
    As part of a Worksheet_Change event, each sheet's name will be linked to its cell A1.

    Please Login or Register  to view this content.
    Thanks for your response. One thing i probably failed to mention was that i would like to have the option of choosing which sheet has which suffix and i would also have more than 10 sheets. Is there a way to input this code for each sheet without using an array function?

  4. #4
    Registered User
    Join Date
    04-01-2004
    Posts
    20
    Ok, things have changed slightly. Hopefully this makes it easier.

    How would i change the worksheet name based on a reference to another cell? Also, i would like the change to occur immediately and NOT have to be manually run.

    I've come up with this but it doesn't happen right away when cell A1 references values from another worksheet within the same workbook. Also, i don't want to apply this to all worksheets in the workbook. Just certain ones. I suppose i could just insert this code under each worksheet where it needs to be done. Can anyone help?:

    Please Login or Register  to view this content.

+ 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