Note: The other languages of the website are Google-translated. Back to English

How to create a list of all worksheet names from a workbook?

Supposing, you have a workbook with multiple worksheets, now you want to list all of the sheet names in current workbook, is there any quick method for creating a list of theses sheet names in Excel without typing them one by one? This tutorial is giving instructions on how to list worksheet names in Excel.


Get a list of all worksheet names from a workbook dynamically with formulas

In Excel, you can define a range name, and then apply a formula to list all sheet names from current workbook, please do with following steps:

1. Go to click Formula > Name Manager, see screenshot:

2. In the Name Manager dialog box, click New button, see screenshot:

3. In the popped out New Name dialog, specify a name into the Name text box, and then copy the below formula into the Refers to text box, see screenshot:

=GET.WORKBOOK(1)&T(NOW())

4. Then click OK > Close to close the dialog boxes, now, please go to a sheet where you want to list all the sheet names, and then enter the following formula into a blank cell:

=IFERROR(INDEX(MID(Sheetnames,FIND("]",Sheetnames)+1,255),ROWS($A$2:A2)),"")

Note: In the above formula, Sheetnames is the range name you are crested in step 3.

5. And then drag the fill handle down to the cells when blank cells are displayed, and now, all sheet names of current workbook have been listed as below screenshot shown:

6. If you want to create the hyperlink for each sheet, please use the below formula:

=HYPERLINK("#'"&A2&"'!A1","Go To Sheet")

Note: In the above formula, A2 is the cell that contains the sheet name, and A1 is the cell where you want the active cell to be located. For example, if you click the hyperlink text, it will locate the cell A1 of the sheet.

7. Now, when you click the hyperlink text, it will take you to that sheet, see below demo:

Notes:
  • 1. With the above formulas, the created sheet names are listed dynamically, when you change the sheet name in the workbook, the index sheet name will be updated automatically.
  • 2. You should save the file as Excel Macro-Enabled Workbook format, if you want the formulas work well after the file is closed and reopened.

Get a list of all worksheet names from a workbook with VBA code

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

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA: List all worksheet names with hyperlinks in a new worksheet:

Sub CreateIndex()
'updateby Extendoffice
    Dim xAlerts As Boolean
    Dim I  As Long
    Dim xShtIndex As Worksheet
    Dim xSht As Variant
    xAlerts = Application.DisplayAlerts
    Application.DisplayAlerts = False
    On Error Resume Next
    Sheets("Index").Delete
    On Error GoTo 0
    Set xShtIndex = Sheets.Add(Sheets(1))
    xShtIndex.Name = "Index"
    I = 1
    Cells(1, 1).Value = "INDEX"
    For Each xSht In ThisWorkbook.Sheets
        If xSht.Name <> "Index" Then
            I = I + 1
            xShtIndex.Hyperlinks.Add Cells(I, 1), "", "'" & xSht.Name & "'!A1", , xSht.Name
        End If
    Next
    Application.DisplayAlerts = xAlerts
End Sub

2. Then press F5 key to run the code, and all of the worksheet names in active workbook have been listed into a new worksheet called Index, and the sheet names are linked to each sheet as well, see screenshot:


Get a list of all worksheet names from a workbook with a useful feature

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.

Note:To apply this Create List of Sheet Names, firstly, you should download the Kutools for Excel, and then apply the feature quickly and easily.

After installing Kutools for Excel, please do as this:

1. Click Kutools Plus > Worksheet > Create List of Sheet Names, see screenshot:

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

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

(2.) Enter the worksheet names for sheet index.

(3.) Specify the location of the worksheet index.

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

Click to Download and free trial Kutools for Excel Now!

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 hyperlinks worksheet names with macro buttons

Click to Download and free trial Kutools for Excel Now!


More relative articles:

  • List All Filenames In A Folder And Create Hyperlinks For Them
  • For your daily work, you may need to import multiple filenames from a folder to a worksheet, and create hyperlinks for each files so that open the file quickly and easily. Maybe, you can copy and paste the filenames and create a hyperlink for it one by one manually, but, this will waste much time if there are hundreds files in the folder.
  • Copy Or Move Files From One Folder To Another Based On A List
  • If you have a list of file names in a column in a worksheet, and the files locate in a folder in your computor. But, now, you need to move or copy these files which names are listed into the worksheet from their original folder to another one as following screenshot shown. How could you finish this task as quickly as you can in Excel?
  • Navigate Between Worksheets By Using Drop Down List
  • Supposing, you have a workbook which contains multiple worksheets, now, you need to create a drop down list or combo box which lists all sheet names and when you select one sheet name from the drop down list, it will jump to that sheet immediately. This article, I will introduce how to navigate between worksheets by using a drop down list in Excel.

The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office / Excel 2007-2021 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

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!
officetab bottom
Comments (19)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Great - but how do I do this in Visio ie for an index of worksheets in visio?
This comment was minimized by the moderator on the site
How to list the Sheetname of a sub WB and list them in the Main WB?
This comment was minimized by the moderator on the site
The 'Range' step in your ListWorkSheetNames macro generates runtime error 1004: method range of object global failed. I have it saved in a PERSONAL.XLSB module, running from a macro-enabled spreadsheet in Office10. What am I missing? Sub ListWorkSheetNames() For i = 1 To Sheets.Count Range(”A” & i) = Sheets(i).Name Next i End Sub
This comment was minimized by the moderator on the site
the best it worked like charm
This comment was minimized by the moderator on the site
it's great worked like charm
This comment was minimized by the moderator on the site
VBA code works nice to save times ever , Thanks tooooooooooooooooooooooooooooooo much
This comment was minimized by the moderator on the site
Hi I would like to know how to list the tab color next to the tab name in this macro? E.g. in the KutoolsforExcel sheet list: Column A Column B TabName1 Yellow
This comment was minimized by the moderator on the site
THANK YOU SO MUCH! I freaking love your website. In a matter of minutes I've had a ton of time saved with two sections of this site including this one. Love it!
This comment was minimized by the moderator on the site
sooooo helpful, works as expected!!!!! Thanks
This comment was minimized by the moderator on the site
Works great!! Thank you!!!!
This comment was minimized by the moderator on the site
Thanks so much, this worked great.
This comment was minimized by the moderator on the site
Causes problems when document protection is enabled by email or corporate policy
This comment was minimized by the moderator on the site
BRILLIANT!! Thank you so much! 😊
This comment was minimized by the moderator on the site
I tried this one and it works. But when I close and open the file again all the values in my sheet names are blank and gone but the formula is still there. I tried enteing the same formula again but it doesn't show the value anymore
This comment was minimized by the moderator on the site
I close and open my document and all values in my sheet names column are all gone and blank but still the formula is there. I tried entering the same formula but it doesn't show the value anymore
This comment was minimized by the moderator on the site
Hello, Anne,
Sorrry for replying late, after creating the range names and formulas, you should save the workbook as Excel Macro-Enabled Workbook format, so next time, when you open the Excel file,the formulas can work well.
Please try, hope it can help you!
This comment was minimized by the moderator on the site
Hello,

je viens de tester la méthode via macros (dynamique avec formules) et ça marche au poil donc je tiens vraiment à remercier l'auteur de cet article parce que ça va vraiment m'aider dans mon travail ! Juste, je me permet de corriger les formules pour la version française. Et alors je ne sais pas si c'est parce que je suis sous la version 2019 mais Excel rouspète quand il n'y a pas d'argument en 3ème position de la fonction STXT ("MID" en version anglaise) donc obligé d'en rajouter un. Donc voilà ce que ça donne :

=LIRE.CLASSEUR(1)&T(MAINTENANT())

=SIERREUR(INDEX(STXT(nomsFeuilles;TROUVE("]";nomsFeuilles)+1,255;20);LIGNES($A$2:A2));"")

Bon travail à tous ! ;-)
This comment was minimized by the moderator on the site
Hello, Gizmil
Thank you for your comment, there are some functions are only available for English in Excel.
Your formula may help others.
Thanks again!
This comment was minimized by the moderator on the site
First, thanks to the author. And adding the Czech version.

tp 3. =O.KNIZE(1)&T(NYNÍ())
tp 4. =IFERROR(INDEX(ČÁST(nazvylistu;NAJÍT("]";nazvylistu)+1;255);ŘÁDKY($A$2:A4));"")
There are no comments posted here yet

Follow Us

Copyright © 2009 - www.extendoffice.com. | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL