+ Reply to Thread
Results 1 to 14 of 14

Dynamically Rename a worksheet name

  1. #1
    Forum Contributor
    Join Date
    01-31-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    191

    Dynamically Rename a worksheet name

    Hello All,

    I want that my worksheet name to be dynamically change base on the Lot Number of my Products in my cell B1 & C1.
    I want my worksheet name to be 13K032 vs 18M028.

    I found this code on the Internet but not applicable to my case. Can you please help me to improve this code to suite to my present case.

    This question is also posted to https://chandoo.org/forum/threads/dy...t-names.37841/

    Please Login or Register  to view this content.
    Please find attached excel file.

    Thank you in advance.
    Attached Files Attached Files
    Last edited by thong127; 04-03-2018 at 07:21 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,220

    Re: Dynamically Rename a worksheet name

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: Dynamically Rename a worksheet name

    Try this (Code in Sheet1 AKA 13K032 vs 18M088 - for the moment
    Please Login or Register  to view this content.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  4. #4
    Forum Contributor
    Join Date
    01-31-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Dynamically Rename a worksheet name

    Hi AliGw,

    where can I find this # icon?

    Thanks

  5. #5
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: Dynamically Rename a worksheet name

    Hmm, changing the cell value by VBA isn't firing off the macro.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,220

    Re: Dynamically Rename a worksheet name

    Quote Originally Posted by thong127 View Post
    Hi AliGw,

    where can I find this # icon?

    Thanks
    On the toolbar when you edit the thread.

  7. #7
    Forum Contributor
    Join Date
    01-31-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Dynamically Rename a worksheet name

    Hi dflak,

    Thank you for the reply. I tried but its giving me a sheet name "New Name"

    Thanks

  8. #8
    Forum Contributor
    Join Date
    01-31-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Dynamically Rename a worksheet name

    Thanks AliGW,

    I did it.

  9. #9
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: Dynamically Rename a worksheet name

    I did not initially catch that you were changing values on the Comparative Sheet. So the code has to go there with a slight modification. There are two big assumptions:
    1. The lots will be changed in columns B or C.
    2. The Sheet to be renamed is Sheet (1)

    I can work around the second assumption with a selection change event if needs be.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,220

    Re: Dynamically Rename a worksheet name

    Thank you for adding the code tags.

  11. #11
    Forum Contributor
    Join Date
    01-31-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Dynamically Rename a worksheet name

    Thank you too. I learned a lesson today.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,220

    Re: Dynamically Rename a worksheet name

    Rule 08: Cross-posting Without Telling Us

    Your post does not comply with Rule 8 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question. If you have fewer than 10 posts here, you will not be able to post a link, but you must still tell us where else you have asked the question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    No further help to be offered, please, until the OP has complied with this request.

  13. #13
    Forum Contributor
    Join Date
    01-31-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Dynamically Rename a worksheet name

    This question is also posted to

    https://chandoo.org/forum/threads/dy...t-names.37841/

    Thank you

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,220

    Re: Dynamically Rename a worksheet name

    Thank you.

+ 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. [SOLVED] Rename table column range dynamically
    By Richavlaues in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-24-2016, 11:58 AM
  2. [SOLVED] Dynamically copy comments from one worksheet to a cell in a summary worksheet.
    By Kramxel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2015, 05:17 AM
  3. [SOLVED] Use Current Worksheet Name in Formula to Rename Newly Created Worksheet
    By MICowboy13 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-12-2015, 04:26 PM
  4. Rename files dynamically
    By kborgers in forum Excel General
    Replies: 6
    Last Post: 09-02-2014, 08:31 AM
  5. [SOLVED] How to copy worksheet to new worksheet each week and rename the tabs for the monday date.
    By tmeakin! in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-04-2013, 01:17 PM
  6. Dynamically add Worksheet / rename / update the formula to include the new worksheet
    By Rajnishbhatt in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-30-2012, 12:31 AM
  7. Excel 2010 Macro to copy worksheet, update formula and rename worksheet
    By madmak0203 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 09:18 PM

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