How to List Worksheet Names in Excel?

We may need to get a list of worksheet names in a workbook. For example, we might want to create an index of worksheet names in workbook. To make such a list is not simple, this tutorial is giving instructions on how to list worksheet names in Excel.

List worksheet names by using VBA code

List worksheet names and link to each worksheet by using Kutools for Excel

Recommended Productivity Software

Office Tab: Use tabbed interface in Office as the use of web browser Chrome, Firefox and Internet Explorer.
Kutools for Excel: Adds 120 powerful new features to Excel. Increase your productivity in 5 minutes. Save two hours every day!
Classic Menu for Office: Brings back your familiar menus to Office 2007, 2010 and 2013 (includes Office 365).

arrow blue right bubble List worksheet names by using VBA code

Hint


The following two VBA codes can help you list all of the worksheet names in a new worksheet or the active worksheet. Please do as this:

1. Click Developer > Visual Basic, a new Microsoft Visual Basic for applications window will be displayed (or you can press the shortcut key Alt + F11 to open the window), then click Insert > Module, and input the following code into the Module:

VBA: List worksheet names in a new worksheet named “KutoolsforExcel”.

Sub ListWorkSheetNamesNewWs()
'Updateby20140624
Dim xWs As Worksheet
On Error Resume Next
Application.DisplayAlerts = False
xTitleId = "KutoolsforExcel"
Application.Sheets(xTitleId).Delete
Application.Sheets.Add Application.Sheets(1)
Set xWs = Application.ActiveSheet
xWs.Name = xTitleId
For i = 2 To Application.Sheets.Count
xWs.Range("A" & (i - 1)) = Application.Sheets(i).Name
Next
Application.DisplayAlerts = True
End Sub

VBA: List worksheet names in active worksheet.

Sub ListWorkSheetNames()
'Updateby20140624
Dim xWs As Worksheet
Set xWs = Application.ActiveSheet
For i = 1 To Application.Sheets.Count
xWs.Range("A" & i) = Application.Sheets(i).Name
Next i
End Sub

2. Then click doc-merge-multiple-workbooks-button button to run the code, and all of the worksheet names in active workbook have been listed.

The above two codes only support to create a list of all worksheet names in the workbook, but if you want to add links to the worksheet names, how could you do? The following method may help you.


arrow blue right bubble List worksheet names and link to each worksheet by using Kutools for Excel

With the Create List of Sheet Names utility of the third party add-in Kutools for Excel, you are able to create a list of worksheet names in one click, and link to each worksheet with hyperlink.

Kutools for Excel: with more than120 handy Excel add-ins, free to try with no limitation in 30 days.Get it Now.

After installing Kutools for Excel, apply Create List of Sheet Names tool according to these steps:

1. Click Enterprise > Worksheet Tools > Create List of Sheet Names, see screenshot:

doc-list-worksheet-names1

2. In the Create List of Sheet Names dialog box, please specify the following settings:

doc-list-worksheet-names2

Choose sheet index styles you like, you can create the worksheet names with hyperlinks or with macro buttons.

Enter the worksheet names for sheet index.

Specify the location of the worksheet index.

Specify how much columns you want to use in the new worksheet to display the worksheet names.

3. After finishing the settings, then click OK. All of the worksheet names have been listed with links in a new worksheet of the current workbook. See screenshot:

worksheet names with hyperlinksworksheet names with macro buttons
doc-list-worksheet-names3doc-list-worksheet-names4

Click to know more about this feature.


Is your problem solved?

Recommended Productivity Tools

The following tools will greatly save your time and effort, which one do you prefer?
Office Tab: Using handy tabs in your Office, as the way of Chrome, Firefox and New Internet Explorer.
Kutools for Excel: 120 powerful new functions for Excel, Increase your productivity in 5 minutes. Save two hours every day!
Classic Menu for Office: Bring back familiar menus to Office 2007, 2010, 2013 and 365, as if it were Office 2000 and 2003.

Kutools for Excel

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

gold star1 More than 120 powerful advanced functions which designed for Excel:

  • 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,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

btn read more     btn download     btn purchase