Skip to main content

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.

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


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!
Comments (13)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hallo. hoe zou ik dit kunnen doen om hetzelfde te doen maar met een welbepaade cel van verschillende werkbladen. Bv. een leeg tabblad. mijn andere werkbladen hebben allemaal dezelfde lay-out, maar in iedere cel een andere tekst. Nu zou ik graag in mijn leeg tabblad in Cel A1 de gegevens terugvinden van tabblad1 cel B3. Maar dan zou ik graag in Cel A2 de gegevens terugvinden van tabblad 2 cel 3. En zou naar beneden en dit in een beweging. We kunnen allemaal afzonderlijk doen, maar als er 500 werkbladen zijn, is dit onmogelijk.

Merci voor den input.
This comment was minimized by the moderator on the site
Hi, I guess you want to list all same cells across multiple sheets, if so, there are two tutorials may help you. Please visit:
How to reference same cell from multiple worksheets in Excel?
How to create a list from same cells across multiple sheets in Excel?
Hope it is helpful.
This comment was minimized by the moderator on the site
Em português brasileiro, GET.WORKBOOK é identificado como uma função no Gerenciador de Nomes para criar o nome "Sheets", mas ao referenciar "Sheets" numa célula, aparece o erro "#NOME?". Tentei várias vezes, inclusive com a sugestão de traduzir GET.WORKBOOK para OBTER.LIVRO mas não funcionou.
This comment was minimized by the moderator on the site
Hi, try this: =SUBSTITUIR(INFO.PASTA.TRABALHO(1),"["&INFO.PASTA.TRABALHO(16)&"]","")
This comment was minimized by the moderator on the site
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!
This comment was minimized by the moderator on the site
Sorry, I do not find that code can finish your job.
This comment was minimized by the moderator on the site
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.
This comment was minimized by the moderator on the site
Just what I needed and worked perfectly. Thank you!
This comment was minimized by the moderator on the site
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.
This comment was minimized by the moderator on the site
how can I use this code to create the list of worksheets in horizontal order instead of vertical? is it possible?
This comment was minimized by the moderator on the site
Thank you. It is very useful. :D
This comment was minimized by the moderator on the site
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
This comment was minimized by the moderator on the site
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?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations