Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to make sheet tab name equal to cell value in Excel?

In some cases, you may need to rename a worksheet based on a specified cell value. In this article, we will show you methods of making sheet tab name equal to cell value in Excel.

Make sheet tab name equal to cell value with VBA code

Make sheet tab name equal to cell value with Kutools for Excel


Easily create a sheet index by listing all sheet names in Excel:

Click Kutools Plus> Worksheet > Create List of Sheet Names to easily list all worksheet names in a new worksheet in Excel. And you can shift to corresponding worksheet directly with clicking on the sheet name.

Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download the free trial Now!

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

arrow blue right bubble Make sheet tab name equal to cell value with VBA code


With the following VBA code, you can make sheet tab name equal to cell value automatically.

1. Right click the sheet tab which you want to make the sheet name equal to cell value, then click View Code from the right-clicking menu. See screenshot:

2. Copy and paste below code into the Code window, and then press Alt + Q keys simultaneously to close the Microsoft Visual Basic for Applications window.

VBA code: Make sheet tab equal to cell value

Private Sub Worksheet_Change(ByVal Target As Range)
	If Not Intersect(Target, Range("A1")) Is Nothing Then
		ActiveSheet.Name = ActiveSheet.Range("A1")
	End If
End Sub

Note: In the code, A1 is the cell which contains the value you need to use as sheet name. You can change it as you need.

From now on, when the value in cell A1 changed, the sheet tab name will be changed equally as well.


arrow blue right bubble Make sheet tab name equal to cell value with Kutools for Excel

In this section, we introduce you the Rename Multiple Worksheets utility of Kutools for Excel. With this utility, you can easily rename worksheets with certain cell’s value in Excel.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days.

1. Click Kutools Plus > Worksheet > Rename Multiple Worksheets. See screenshot:

2. In the Rename Multiple Worksheets dialog box, you need to do as follows.

1). Check the worksheet names you want to rename in the Worksheets box (you can select one sheet or multiple sheets).

2). Select Replace original sheet name box in the Rename Options section.

3). If you want to rename a worksheet or multiple worksheets with specified cell’s value, please select the From specific range option, and select the range of cells that you want to rename the sheets based on.

3). Click the OK button. See screenshot:

You can see the selected worksheets are renamed by the specified range value immediately as below screenshot shown.

Notes:

1. You can use the Filter function to easily filter out the needed worksheet if there are lots of worksheets exist.

2. If you want to rename multiple worksheets with a certain cell value in each sheet. For example, sheet1 will be equal to its cell A1’s value, and sheet2 will also be equal to its cell A1’s value. Please select worksheets in the Worksheets box, then select the Rename worksheets with specific cell option, and specify cell A1 in the box.

3. The sheet name won’t be changed automatically with the cell value changes.


arrow blue right bubble Make sheet tab name equal to cell value with Kutools for Excel

Kutools for Excel includes more than 300 handy Excel tools. Free to try with no limitation in 60 days. Download the free trial now!


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Nilanjan Pal · 2 years ago
    You can rather use simple macro



    Sub Macro3()
    Dim index As Integer
    For index = 1 To 18

    Sheets(index).Name = Sheets(index).Range("A2").Value

    Next index



    End Sub
  • To post as a guest, your comment is unpublished.
    JAS · 2 years ago
    I got the whole code, and it worked. Thank you so much for your help!
  • To post as a guest, your comment is unpublished.
    jJJ · 2 years ago
    I am getting this code to work, but it does not automatically update the tab name when the cell it pulls the name from if referencing another cell (and that cell changes).


    I.e. I change a cell in a master list, which changes the cell text in a specific cell on each tab, which the code is referencing as the tab name, BUT the tab doesn't update its name correspondingly.
    • To post as a guest, your comment is unpublished.
      crystal · 2 years ago
      Good day,
      The following VBA code can solve your problem. Thank you for your comment1

      Private Sub Worksheet_Change(ByVal Target As Range)
      Dim xRg As Range, xCell As Range
      On Error Resume Next
      If Not Intersect(Target, Range("A1")) Is Nothing Then
      ActiveSheet.Name = ActiveSheet.Range("A1")
      End If
      Application.EnableEvents = False
      Set xRg = ActiveSheet.Range("A1").Precedents
      If Not xRg Is Nothing Then
      For Each xCell In xRg
      ActiveSheet.Name = ActiveSheet.Range("A1")
      Next
      End If
      Application.EnableEvents = True
      End Sub
      • To post as a guest, your comment is unpublished.
        NOOR · 9 months ago
        I change a cell in a master list, which changes the cell text in a specific cell on each tab, which the code is referencing as the tab name, BUT the tab doesn't update its name correspondingly.

        ---- it's not work
      • To post as a guest, your comment is unpublished.
        John Hammonds · 10 months ago
        I need to use this code but I've never entered vba code before. Any guidance would be appreciated.
      • To post as a guest, your comment is unpublished.
        JAS · 2 years ago
        Still doesn't work. I'm having the same issue as jJJ. crystal: Is the whole code shown in your reply?
        The last line shown in your comment is "Set xRg = ActiveSheet.Range("A1").Precedents"
        • To post as a guest, your comment is unpublished.
          crystal · 2 years ago
          Dear JAS,
          Please click the Read more button on the right side of the comment to display the whole comment.
          • To post as a guest, your comment is unpublished.
            Alex · 1 years ago
            Still have the same issue.

            I have A1 of the new sheet point to another cell in a different tab. It updates the first time (when you execute) but then no change when editing the master cell
            • To post as a guest, your comment is unpublished.
              Rj · 4 months ago
              Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
              Set Target = Range("A1")
              If Target = "" Then Exit Sub
              On Error GoTo Badname
              ActiveSheet.Name = Left(Target, 31)
              Exit Sub
              Badname:
              MsgBox "Please revise the entry in A1." & Chr(13) _
              & "It appears to contain one or more " & Chr(13) _
              & "illegal characters." & Chr(13)
              Range("A1").Activate
              End Sub
  • To post as a guest, your comment is unpublished.
    Jason · 2 years ago
    I pasted this in as instructed but it didn't show up in my list of available Macros. I tried to manually run it by keying in the Macro name. When it attempted to run the Macro, an error message came up "Argument no optional".

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("A1")) Is Nothing Then
    ActiveSheet.Name = ActiveSheet.Range("A1")
    End If
    End Sub

    Has anyone else run this code and had the same issue?

    As a test I ran more basic code and it worked fine so the value in "A1" isn't causing the problem. When I run the code below I can see the Macro name "myTabName" in the Macro list. The code above doesn't appear and I'm assuming this is because of the bug/missing argument.

    Sub myTabName()
    ActiveSheet.Name = ActiveSheet.Range("A1")
    End Sub

    Thanks for your help as I'd very much like to use the code as intended for automating tab name changes based on a cell value..
    • To post as a guest, your comment is unpublished.
      crystal · 2 years ago
      Dear Jason,
      The code works well in my case. Would you please provide your Office version? Thank you for your comment.