Log in  \/ 
x
or
x
x
Register  \/ 
x

or

How to create a dynamic list of worksheet names in Excel?

If you have multiple sheets in a workbook, and you want to create a dynamic list of all sheet names in a new sheet in the workbook, how can you do? Now this tutorial introduces some tricks to quickly complete this mission in Excel.

Create a dynamic list of worksheet names with Define Name and Formula

Create a dynamic list of worksheet names with VBA code

Create a dynamic list of worksheet names with Kutools for Excel good idea3

Display a dynamic list of worksheet names with Kutools for Excel good idea3


1. Select a cell in a blank sheet, here I select A1, and then click Formulas > Define Name. see screenshot:
doc-dynamic-worksheetname-list-1

2. Then in the New Name dialog, type Sheets in to the Name textbox (you can change as you need), and type this formula =SUBSTITUTE(GET.WORKBOOK(1),"["&GET.WORKBOOK(16)&"]","") into the Refers to textbox. See screenshot:
doc-dynamic-worksheetname-list-2

3. Click OK. The go to the selected cell (A1) and type this formula =INDEX(Sheets,ROWS($A$1:$A1)) (A1 is the cell you type this formula, "Sheets" is the name you defined in Step 2) into it, then drag the autofill handle down until #REF! appears.
doc-dynamic-worksheetname-list-3

Tip: If there are worksheets removed or added, you need to go to A1and press Enter key then rag the autofill handle again.
doc-dynamic-worksheetname-list-4


If you want to create a dynamic list of worksheet names which can link to each sheet, you can use VBA code.

1. Create a new worksheet and rename it as Index. See screenshot:

doc-dynamic-worksheetname-list-5       doc-dynamic-worksheetname-list-6

2. Right click at the sheet name of Index, select View Code from context menu. See screenshot:
doc-dynamic-worksheetname-list-7

3. In the popping window, copy and paste below VBA code into it.

VBA: Create dynamic list of worksheet names.

Private Sub Worksheet_Activate()
	'Updateby20150305
	Dim xSheet As Worksheet
	Dim xRow As Integer
	Dim calcState As Long
	Dim scrUpdateState As Long
	Application.ScreenUpdating = False
	xRow                       = 1
	With Me
		.Columns(1).ClearContents
		.Cells(1, 1) = "INDEX"
		.Cells(1, 1).Name = "Index"
	End With
	For Each xSheet In Application.Worksheets
		If xSheet.Name <> Me.Name Then
			xRow                     = xRow + 1
			With xSheet
				.Range("A1").Name = "Start_" & xSheet.Index
				.Hyperlinks.Add anchor: = .Range("A1"), Address: = "", _
				SubAddress:             = "Index", TextToDisplay: = "Back to Index"
			End With
			Me.Hyperlinks.Add anchor: = Me.Cells(xRow, 1), Address: = "", _
			SubAddress: = "Start_" & xSheet.Index, TextToDisplay: = xSheet.Name
		End If
	Next
	Application.ScreenUpdating = True
End Sub

4. Click Run or F5 to run the VBA, now a dynamic list of worksheet names is created.
doc-dynamic-worksheetname-list-8

Tip:

1. When the worksheet of the workbook is deleted or inserted, the worksheet names list will auto change.

2. You can click at the sheet name of the names list to go to the sheet.

With above two methods are not convinient enough, if you are interested in new utility, You can go next two methods which may make this task more easier.


 If you only want to quickly list all worksheet names of the workbook and link them to the original sheets, you can use Kutools for Excel’s Create List of Sheet Names.

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. Click Kutools Plus > Worksheet > Create List of Sheet Names. See screenshot:

doc dynamic worksheetname 17

2. In the Create List of Sheet Names dialog:

 doc dynamic worksheetname list 2
(1) Check the index style you need in Sheet Index Styles section;
(2) Name the new index sheet with typing the data into Specify sheet name for Sheet Index text box;
(3) Specify the location you will place the added index sheet in in the Insert the Sheet Index in list;
(4) If you want to display the sheet names in a single list, select 1 column in Displaying Sheet Index into list.

3. Click Ok. Now you can see the sheet names are listed.
doc kutools create list of sheets 3

Tips:

1. You can click at the sheet name to quickly shift to its original sheet.

2. The list or sheet names cannot dynamically change with the sheets inserting or deleting.

3. Actually, you also can create a list of button to link the relative sheet, just need to check Contains Buttons and Macros in the dialog. see screeshshot:
doc kutools create list of sheets 4

Click here to know more about Create List of Sheet Names.


If you With Kutools for Excel, you also can use the Navigation utility to display the linkable worksheet names in a pane

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

1. Click Kutools > Navigation. Click Workbook & Sheet to show the workbook and worksheet, and you can select a workbook, then its worksheets will display in the Navigation pane. See screenshot:
doc navigation pane 1   

Tip:

When there are worksheets deleted or added, you can click the refresh button doc navigation pane 2 in the Navigation pane to refresh the worksheet names.

Click here for more information about Navigation.


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-2019 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
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Kelly · 2 years ago
    Thanks for this helpful info. I created a dynamic list with VBA code in the Index tab. I found that it only updates when I click back to the Index tab, though. Is there a way to ensure it auto updates as soon as a new tab is created? I refer to the tab names elsewhere in the workbook and others will be using it so I'm trying to make it seamless. Thank you!
    • To post as a guest, your comment is unpublished.
      Sunny · 1 years ago
      Sorry, I do not find that code can finish your job.
  • To post as a guest, your comment is unpublished.
    Ed Bower · 2 years ago
    Or you can simply rightClick either the left or right tab-horizontal-scroll arrow at the bottomLeft, and then click the worksheet name (from the simple vertical list) that you want to jump to.
  • To post as a guest, your comment is unpublished.
    PB · 2 years ago
    Just what I needed and worked perfectly. Thank you!
  • To post as a guest, your comment is unpublished.
    KP · 3 years ago
    Defining the name "Sheets" in the define name DOES NOT WORK. The "refers to" box will not save the formula as typed and converts it to a text string.
  • To post as a guest, your comment is unpublished.
    j4h54n84 · 3 years ago
    how can I use this code to create the list of worksheets in horizontal order instead of vertical? is it possible?
  • To post as a guest, your comment is unpublished.
    Cindy · 3 years ago
    Thank you. It is very useful. :D
  • To post as a guest, your comment is unpublished.
    Nash · 3 years ago
    How can i remove the links to each sheets and how to not include the "sheet1" and "Index" sheet?

    Private Sub Worksheet_Activate()
    'Updateby20150305
    Dim xSheet As Worksheet
    Dim xRow As Integer
    Dim calcState As Long
    Dim scrUpdateState As Long
    Application.ScreenUpdating = False
    xRow = 1
    With Me
    .Columns(1).ClearContents
    .Cells(1, 1) = "INDEX"
    .Cells(1, 1).Name = "Index"
    End With
    For Each xSheet In Application.Worksheets
    If xSheet.Name Me.Name Then
    xRow = xRow + 1
    With xSheet
    .Range("A1").Name = "Start_" & xSheet.Index
    .Hyperlinks.Add anchor: = .Range("A1"), Address: = "", _
    SubAddress: = "Index", TextToDisplay: = "Back to Index"
    End With
    Me.Hyperlinks.Add anchor: = Me.Cells(xRow, 1), Address: = "", _
    SubAddress: = "Start_" & xSheet.Index, TextToDisplay: = xSheet.Name
    End If
    Next
    Application.ScreenUpdating = True
    End Sub
  • To post as a guest, your comment is unpublished.
    Matt · 3 years ago
    How would I go about editing this code to include a checkbox to the left of the link that I could use to hide rows on a cover sheet? Also how could I insert a row on the worksheets below A1 to have the return to index link show up there?