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

Register

or
0
0
0
s2smodern

## 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

#### Insert Workbook Information

Kutools for Excel's Insert Workbook Information utility can quickly insert sheet name, path, user name and
so on to a cell, header or footer.

#### Quickly insert current sheet name in a cell with functions

###### Amazing! Using Tabs in Excel like Firefox, Chrome, Internet Explore 10!

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.

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

 Never need to worry about long long formulas in Excel anymore! Kutools for Excel's Auto Text can add all formulas to a group as auto text, and liberate your brain! Click here to know Auto Text     Click here to get free trial

#### 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:

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).

#### 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.

 with more than 120 handy Excel functions, enhance working efficiency and save working time.

After Kutools for Excel, please do as below:

1. Select a cell or a range to put the sheet name, and click Enterprise > Workbook > Insert Workbook Information.

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.

#### 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.

 with more than 120 handy Excel functions, enhance your working efficiency and save your working time.

After Kutools for Excel, please do as below:

Step 1: Click the Enterprise > Worksheet Tools > Create List of Sheet Names.

Step 2: In the Create List of Sheet Names dialog box, specify the settings according to your needs, and click OK.

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 macro buttons

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.

#### Combine Worksheets

In sometimes, you may be confused with consolidate or combine multiple sheets/ranges into one sheet or one workbook for some special work, but a powerful utility of Kutools for Excel, Combine Worksheets function can quickly help you handle this job.

### Recommended Productivity Tools

#### Office Tab

Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

#### Kutools for Excel

Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

200 New Features for Excel, Make Excel Much Easy and Powerful:

• Merge Cell/Rows/Columns without Losing Data.
• Combine and Consolidate Multiple Sheets and Workbooks.
• Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
• Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,

Say something here...
symbols left.
###### or post as a guest, but your post won't be published automatically.
People in conversation:
• To post as a guest, your comment is unpublished.
· 5 months ago
Just tried now the macro for inserting all the sheet's name in one sheet. Awesome! Thank you very much
• To post as a guest, your comment is unpublished.
· 6 months ago
How do you get the VBA to start in a specific cell instead of A1?
• To post as a guest, your comment is unpublished.
· 6 months ago
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
• To post as a guest, your comment is unpublished.
· 6 months ago
• To post as a guest, your comment is unpublished.
· 6 months ago
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.
• To post as a guest, your comment is unpublished.
· 11 months ago
Thanks!! this was was a great help.
• To post as a guest, your comment is unpublished.
· 1 years ago
Hi

Kindly i want VBA code to insert file name in specific cell.

Thanks
• To post as a guest, your comment is unpublished.
· 1 years ago