+ Reply to Thread
Results 1 to 3 of 3

Automatically change a tab's name to a cell with a formula.

Hybrid View

  1. #1
    Forum Contributor Big.Moe's Avatar
    Join Date
    03-15-2012
    Location
    Corea, Maine, USA
    MS-Off Ver
    Excel 2010
    Posts
    262

    Automatically change a tab's name to a cell with a formula.

    Hello,
    I would like to automatically change a tab's name to whatever the value is in cell A1 on that same sheet. I found the Excel Forum thread below that provides a solution for this:

    https://www.excelforum.com/excel-for...d-formula.html

    In this thread, the following code is used to make this happen:
    Private Sub Worksheet_Calculate()
    On Error Resume Next
    Sheet1.Name = Range("A1").Value
    End Sub
    I know I am a total VBA noob, but this seems pretty simple and self explanatory, but for the life of me I cannot get it to work.
    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Automatically change a tab's name to a cell with a formula.

    A1 contains a date which evaluates to a string containing the "/' y,m,d, separators. That's an invalid character for a sheet name.

    Use

    Sheet100.Name = Format(Range("A1").Value, "mmmm yyyy")
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor Big.Moe's Avatar
    Join Date
    03-15-2012
    Location
    Corea, Maine, USA
    MS-Off Ver
    Excel 2010
    Posts
    262

    Re: Automatically change a tab's name to a cell with a formula.

    Richard you are an Excel saint!!

    That did the trick. Holy cow, did I go round and round with that sucker.

    Many thanks!

+ 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] Hyperlink Formula Cell reference change Automatically
    By disepyon in forum Excel General
    Replies: 10
    Last Post: 07-23-2017, 05:58 AM
  2. Recorded formula won't automatically change from R1C1 to A1 upon cell application
    By jcanlas in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-02-2015, 10:36 AM
  3. CNTCOLOR formula does not update automatically when I change the cell color
    By tracyxiao in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 12-18-2013, 07:33 PM
  4. Replies: 5
    Last Post: 04-03-2013, 04:15 PM
  5. [SOLVED] Help with a macro to change formula automatically in new cell
    By RiceKrispy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2012, 10:27 AM
  6. Button /cell formula to automatically change sheets
    By mcqueen in forum Excel General
    Replies: 3
    Last Post: 02-25-2008, 01:44 PM
  7. Replies: 7
    Last Post: 04-04-2006, 11:20 PM

Tags for this Thread

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