Solved Tab Name = cell content

July 7, 2016 at 15:24:02
Specs: Windows 7
Seeing some documentation but it shows a formula for file path.
I just want the name of the tab to be on for example the content of cell B1 as part of my header of the spreadsheet, so I do not have to go to each tab and change the name of that cell. How do i get that?

See More: Tab Name = cell content

Reply ↓  Report •

July 7, 2016 at 16:30:24
✔ Best Answer
I'm a little confused by the wording in your post. I can't tell if you want the Tab name to be placed in a cell or if you want the Tab name to be based on the contents of a cell.

Here is how both can be done:

To place the name of the tab in a cell, save the workbook first then put this formula in any cell. Do not change the A1 cell reference, just use the formula as is:


To name a tab based on the contents of a cell, you will need a macro. There are various ways to get the macro to run, but here is the basic code:

Sub TabNameFromCell()
  For shtNum = 1 To Sheets.Count
    Sheets(shtNum).Name = Sheets(shtNum).Range("B1")
End Sub

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Reply ↓  Report •
Related Solutions

Ask Question