+ Reply to Thread
Results 1 to 3 of 3

Macro to automatically update sheet name based on cell value

  1. #1
    Registered User
    Join Date
    12-16-2011
    Location
    Oregon
    MS-Off Ver
    Excel 2007
    Posts
    12

    Question Macro to automatically update sheet name based on cell value

    I want to be able to update the sheet name based upon a certain cell value in the corresponding sheet. For example if the Value in in Sheet 1, Cell B3 is "Left Wing" I want the name of Sheet one to say Left Wing. If I change the name to Right wing, I want the sheet to automatically update to Right wing. How can I do this?

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Macro to automatically update sheet name based on cell value

    seanfoxen,

    You would use a Worksheet_Change event. Place this code in the desired Sheet module:
    Please Login or Register  to view this content.


    Its important to note that renaming a worksheet this way could cause an invalid worksheet name, which will result in an error.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    12-16-2011
    Location
    Oregon
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Macro to automatically update sheet name based on cell value

    Quote Originally Posted by tigeravatar View Post
    seanfoxen,

    You would use a Worksheet_Change event. Place this code in the desired Sheet module:
    Please Login or Register  to view this content.


    Its important to note that renaming a worksheet this way could cause an invalid worksheet name, which will result in an error.
    Great Thank You!

+ 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