+ Reply to Thread
Results 1 to 11 of 11

Rename active sheet based on cell value.

  1. #1
    Registered User
    Join Date
    04-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    45

    Rename active sheet based on cell value.

    Hello all,

    I was wondering if anyone can help me out here.

    I have a few macros set up to copy a sheet, and add a row to my table.

    Now what I need to know, can I rename my active sheet based on the bottom value in a range?

    I have associated my table as "Table1" and what Would be great is if I could rename a sheet the bottom value in Column A.

    Please help me out here, I am so close to finally finishing this project.

    Thanks for your time.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,905

    Re: Rename active sheet based on cell value.

    Have a look at this link:

    http://www.ozgrid.com/forum/showthread.php?t=65841
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    04-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: Rename active sheet based on cell value.

    Thanks Alan, is there any way to have it select the last cell with data in it in a range?

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,905

    Re: Rename active sheet based on cell value.

    Yes. Try this:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: Rename active sheet based on cell value.

    Unfortunately what it does is make a new sheet, not just rename the active one.

    Is there any way to add renaming the sheet to this macro?

    All of my sheet names are numbered 1-100, this macro creates a page from a template, adds a row to my table and now all I need to do is make it rename the page after the new row, which in this case would have "101" as a name.

    Please Login or Register  to view this content.
    Thanks for your help Alan. I really appreciate it.

    Right now my new sheet is called "Template (2)".

    I would like it to be named 101 in this case.

    Then the next sheet when I run the macro would be 102.
    Last edited by Dagoom; 11-10-2013 at 01:21 AM.

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,617

    Re: Rename active sheet based on cell value.

    Are you adding a new sheet and then renaming it, or just renaming an existing sheet?
    Ben Van Johnson

  7. #7
    Registered User
    Join Date
    04-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: Rename active sheet based on cell value.

    I am adding a sheet with my one macro, then was planning on adding the second macro to the first to rename it using the last used cell in my table, or range of A column.

  8. #8
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,617

    Re: Rename active sheet based on cell value.

    Try this mods using alansidman's code above:

    Please Login or Register  to view this content.
    Last edited by protonLeah; 11-10-2013 at 05:55 PM.

  9. #9
    Registered User
    Join Date
    04-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: Rename active sheet based on cell value.

    THANK YOU SO MUCH!

    That works amazingly.

    You are the man.

  10. #10
    Registered User
    Join Date
    04-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: Rename active sheet based on cell value.

    Is there any way to make it so if the number in Column A is below 99, it adds a different template?

    If not it's not a huge deal, you guys have done more than enough for me.

    Oops, sorry for the double post.
    Last edited by Dagoom; 11-10-2013 at 02:57 AM. Reason: Didn't mean to double post.

  11. #11
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,617

    Re: Rename active sheet based on cell value.

    Something like:

    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)

Similar Threads

  1. Rename Sheet based on Cell Value
    By Vetequk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-07-2015, 09:07 PM
  2. Create A Copy To A New Sheet & Rename Sheet Based on Cell Value
    By delicard in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 07-25-2013, 08:56 PM
  3. [SOLVED] Copy a sheet (from template) to a new sheet, and rename (based on cell value)
    By Siglen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-30-2012, 10:19 AM
  4. Replies: 0
    Last Post: 04-28-2012, 06:06 PM
  5. [SOLVED] Rename active sheet to contents of specific cell
    By burl_rfc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-28-2006, 07:40 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