Skip to main content

How to quickly insert sheet names in cells in Excel?

Is there an easy way to insert the current worksheet's name in one cell? How to insert all worksheets' name in cells? This article will bring you tricky methods to solve these problems.

Quickly insert current sheet name in a cell with functions

Quickly insert all sheet names in cells with VBA

Quickly insert active sheet’s name with Kutools for Excel good idea3

Quickly insert all sheet names with hyperlinks in cells as an index good idea3


arrow blue right bubble Quickly insert current sheet name in a cell with functions

Just enter the formula of =RIGHT(CELL("filename",D2),LEN(CELL("filename",D2))-FIND("]",CELL("filename",D2))) in any cell and press Enter key, it shows the current worksheet's name in the cell.
doc-insert-sheets-name-into-cells1

This formula is only able to show current worksheet's name, but not other worksheet's name.


arrow blue right bubble Quickly insert all sheet names in cells with VBA

If you want to inset all sheet names in cells, VBA macro is a good choice.

Step 1: Hold down the Alt + F11 keys in Excel, and it opens the Microsoft Visual Basic for Applications window.

Step 2: Click Insert > Module, and paste the following macro in the Module Window.

VBA for inserting all worksheets' names in cells:

Sub SheetNames()
Columns(1).Insert
For i = 1 To Sheets.Count
Cells(i, 1) = Sheets(i).Name
Next i
End Sub

Step 3: Press the F5 key to run this macro. Then you will all worksheets' name are listed in Column A of current worksheet. See screenshot:
doc-insert-sheets-name-into-cells2

Note: In the VBA code, you can change Cells(i, 1) to other reference to insert the sheet names start at other cells. For instance, insert sheet names start from C3, change it to Cells(i+2, 3).


arrow blue right bubble Quickly insert active sheet’s name with Kutools for Excel

If you want to insert the active sheet’s information including sheet name, workbook name, file path and so on to a cell or header/footer, you can use Kutools for Excel’s Insert Workbook Information.

Kutools for Excel, with more than 300 handy functions, makes your jobs more easier. 

After free installing Kutools for Excel, please do as below:

1. Select a cell or a range to put the sheet name, and click Kutools Plus > Workbook > Insert Workbook Information.doc insert worksheet information 1

2. Then select the workbook information you need to insert from Information section, and specify the location you want to place the information from Insert at section. Then click OK.

doc 1

You can click here to know more about Insert Workbook Information.

arrow blue right bubble Insert workbook information into cell/Header/Footer


arrow blue right bubble Quickly insert all sheet names with hyperlinks in cells as an index

Kutools for Excel's Create List of Sheet Name utility not only inserts all sheet names in cells, but also insert hyperlinks to corresponding sheets too.

Kutools for Excel, with more than 300 handy functions, makes your jobs more easier. 

After free installing Kutools for Excel, please do as below:

Step 1: Click the Kutools Plus > Worksheet > Create List of Sheet Names.
doc-insert-sheets-name-into-cells3

Step 2: In the Create List of Sheet Names dialog box, specify the settings according to your needs, and click OK.
doc-insert-sheets-name-into-cells4

Then you will see all sheet names are inserted in a new worksheet, and each sheet name link to corresponding worksheet. See following screenshots:

Worksheet names with hyperlinks
Worksheet names with macro buttons
doc-insert-sheets-name-into-cells5
doc-insert-sheets-name-into-cells6

The Create List of Sheet Name utility makes it easy for you to create a list of all worksheet names of the active workbook in a new worksheet, which contains hyperlinks or macro buttons for quickly navigate to other worksheets. Click to know more about this utility.

arrow blue right bubble List all sheet names with hyperlinks



Kutools for Excel: 300 + functions you must have in Excel, 30-day free trial from here

Easily Combine multiple sheets/Workbook into one Single sheet or Workbook

To combinne multiples sheets or workbooks into one sheet or workbook may be edious in Excel, but with the Combine function in Kutools for Excel, you can combine merge dozens of sheets/workbooks into one sheet or workbook, also, you can consolidate the sheets into one by several clicks only.  Click for full-featured 30 days free trial!
combine sheets
 
Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days.

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


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!
Comments (32)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
how to find the sheet name (section name ) when you type employee no. in a cell? A workbook has 15 sheets named as per sections of the department.In each section has 100 employees in range A2:A101with unique employee no. I have a list of 50 employee nos in different sections. In a new work sheet how to find the section name which corresponds to the employee no.
This comment was minimized by the moderator on the site
Hello, Ashley Pereira, please visit this: https://www.extendoffice.com/documents/excel/5335-excel-vlookup-return-sheet-name.html this article may help you.
This comment was minimized by the moderator on the site
How do you get this formula to copy the tabnames into consecutive columns. In other words not vertically but horizontally.
This comment was minimized by the moderator on the site
Change the following:

Cells(i, 1) = Sheets(i).Name
to
Cells(1, i) = Sheets(i).Name

This causes to step columns in same row.
This comment was minimized by the moderator on the site
you can copy the data entered, then paste Transpose, this converts Cols to Rows, and Rows to Cols.
This comment was minimized by the moderator on the site
Just tried now the macro for inserting all the sheet's name in one sheet. Awesome! Thank you very much
This comment was minimized by the moderator on the site
How do you get the VBA to start in a specific cell instead of A1?
This comment was minimized by the moderator on the site
Just add to i like I did below. If you add to i you can start on any row you would like.

Sub GetNames()

For i = 1 To Sheets.Count

Cells(i + 6, 1) = Sheets(i).Name

Next i
End Sub
This comment was minimized by the moderator on the site
Thank u for your supplement.
This comment was minimized by the moderator on the site
You can change the number in Cells(i, 1) = Sheets(i).Name to other to insert the sheet names in other column, for instance, insert start from C1,change Cells(i, 1) = Sheets(i) to Cells(i, 3) = Sheets(i), but this VBA only can insert the sheet names start from the row 1.
This comment was minimized by the moderator on the site
Thanks!! this was was a great help.
This comment was minimized by the moderator on the site
Hi Kindly i want VBA code to insert file name in specific cell. Thanks
This comment was minimized by the moderator on the site
Great site was very helpful. I have different tab names and I get the names in one sheet using your code, but it gives names of all the tab names, is there anyway we can add code to select from certain tab number or something like that.
This comment was minimized by the moderator on the site
I have multiple project sheets database with different tab name and this name is shown in master sheet table. which formula can i give that when i insert new tab it should automatically updated in master table.
This comment was minimized by the moderator on the site
Can anyone help me with this: Create a macro that creates 10 sheets and name them Sheet1 to Sheet10 but using a loop
This comment was minimized by the moderator on the site
Hello, Can you please help me with the simple VBA code. I have a list of Names in Column A. Specific Range - (A2:A251) - Now I need to create new spreadsheets with these names. The names are driven from a different sheet, thus they keep changing. So in short, if I have 10 names today, they might not appear tomorrow. So on the click of button all older spreadsheets (except 1) should be deleted first and then from the names on the column, new ones should get created. Please advice if this is possible to do? Thanks, Manish Gupta
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations