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

Kutools for Excel: add 120 new features in Excel. Save one hour every day.
Classic Menu for Office: brings back classic menus to Office 2010 and 2013 (includes Office 365).
Office Tab: brings tabbed interface to Office as the use of web browser Chrome, Firefox and Internet Explorer.

arrow blue right bubble List worksheet names by using VBA code

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

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 code to list worksheet names in a new worksheet named “SheetList”:

Sub ListWorkSheetNames()
Dim Sheetnames
Sheetnames = Sheets.Count
Sheets.Add
ActiveSheet.Name = “SheetList”
Sheets(”SheetList”).Move after:=Sheets(Sheetnames + 1)
For i = 1 To Sheetnames
Range(”A” & i) = Sheets(i).Name
Next i
End Sub

VBA code to list worksheet names in active worksheet:

Sub ListWorkSheetNames()
For i = 1 To Sheets.Count
Range(”A” & i) = 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.


Kutools for Excel

More than 120 Advanced Functions for Excel 2013, 2010, 2007 and Office 365.

screen shot

btn read more     btn download     btn purchase

Comments  

0#SamJ2013-10-16 23:03
Great - but how do I do this in Visio ie for an index of worksheets in visio?
Reply | Reply with quote | Quote
0#Ian Alp2014-04-20 05:13
How to list the Sheetname of a sub WB and list them in the Main WB?
Reply | Reply with quote | Quote

Add comment


Security code
Refresh