How to Add a Table of Contents to Excel (And Why You Should)
Feb 06, 2025 pm 06:50 PMEfficiently manage Excel workbooks: Various ways to create directories
Excel workbook with hundreds of worksheets? Creating a directory makes it easy to find specific worksheets. Although Excel does not have one-click directory creation function, the following methods can help you achieve it!
Why do you need to add a directory in Excel?
If your Excel workbook contains hundreds of worksheets and needs to find specific worksheets to update or modify data, manual search can be very time-consuming. And the directory allows you to easily navigate your workbook and quickly find the tables you want.
As a SEO content writer, I often process large Excel files with keyword data. Using the directory, I can easily jump to Excel worksheets that store the information I need, saving a lot of time and effort and avoid scrolling through countless worksheets and tabs.
Catalogs help maintain structured layouts, logically organize relevant worksheets and sections, thereby improving the overall user experience. It also makes it easier for team members to find specific sections for input and review, and minimizes errors by reducing the possibility of unexpectedly modifying irrelevant data.
The following demonstration uses Microsoft Excel 365. My workbook already contains four worksheets: Team A, Team B, Team C, and Team D.
Add Excel directory manually
To create a directory manually, first determine where to place it. It is recommended to create a new worksheet as a directory for easy search and management.
Create a new worksheet: Right-click any existing worksheet name, then click Insert, and select Worksheet. Alternatively, you can press Shift Alt F1.
Next, select the cell you want to add a hyperlink, such as B5 (or any cell you like).
After selecting the cell, go to the Insert tab, click the Link drop-down item, and select the Insert Link option to display the Insert Hyperlink dialog box. You can also access it using the Ctrl K shortcut key.
Navigate to the "Place in this document" section, select your preferred sheet, and type the text you want to display as a hyperlink. When finished, press OK to insert the link.
Repeat this process for other worksheets.
That's it! Now that you have a clickable link, you will be taken directly to the corresponding worksheet when clicked.
Use hyperlink functions/formula
Another way to manually add directories in Excel is to use the hyperlink function. In this method, you need to type the names of all the sheets and add a hyperlink formula for each sheet separately.
First, select the cell to display the directory and enter the following formula:
<code>=HYPERLINK("#'WorkSheetName'!A1", "FriendlyName")</code>
Where, "WorkSheetName" is the worksheet name for which you want to create a link. The “#” symbol identifies the worksheet and the “!” represents the cell position on the target worksheet. The "FriendlyName" variable indicates the name to be displayed in the directory.
Repeat this process for other worksheets using the same formula.
Automatically generate directory
You can use Excel's Power Query tool to automatically create directories. With this tool, you can list hundreds of worksheets on a specific worksheet with just a few clicks and create hyperlinks that will take you directly to each corresponding worksheet when clicked.
For a smooth connection to Power Query, it is recommended that you pause synchronization with OneDrive of your workbook. You should also make sure that you save the workbook and temporarily disable sharing.
First, go to the Data tab in Excel. Click Get Data, then select From File, and then click the From Excel Workbook option.
A dialog box will appear where you can select the workbook you are currently using. After selecting, click Import.
Do not select a specific table or worksheet from the list that appears, but choose the name of the workbook itself. Then, click Convert Data.
You will now see a list of all the sheets, tables, and defined names in the workbook. Since we only need the worksheet name, the Apply Filter only displays the worksheets in the Type option.
Next, right-click the Name column (including the sheet name) and select Delete Other Columns. This step leaves only one column that lists all sheet names.
You can also rename the title to whatever name you like. After making these changes, click the Close and Load to option.
Select "Existing Worksheet" and enter the cell to start the list (for example, cell A1 or B5).
You will now have a collection of all the sheet names in the workbook.
The last step is to create a hyperlink for the worksheet name using the hyperlink formula. When you create a hyperlink for the first worksheet and press Enter, all worksheet columns will automatically update their hyperlinks. If not, you can simply drag the fill handle to apply the formula to all rows in the directory.
You can create a hyperlink using the following formula:
<code>=HYPERLINK("#'WorkSheetName'!A1", "FriendlyName")</code>
Now if you click any hyperlink, it will take you directly to the corresponding worksheet in the workbook.
Automatically refresh the worksheet
One of the great benefits of using Power Query is that you can easily update directories and add or delete worksheets in your workbooks whenever you add or delete workbooks.
For example, I have added a new worksheet to the workbook and saved it as the name of "Team E". Now I want this worksheet and its hyperlink to appear in the directory.
To update the outline, simply return to the main worksheet and double-click the "Catalog" Excel query that appears to the right of the workbook.
In the menu that opens, click Refresh Preview to update the directory.
However, when you update it, any recently added table or defined name will also be included in the updated directory. To filter it, navigate to the Filtered Rows option, click the Type drop-down menu, and select only Worksheets.
That's it! Power Query will automatically update the directory and include newly added worksheets.
Using VBA code scripts
If your workbook is large, you can also use VBA macros to automate this process by traversing all the sheets, creating list items for each sheet, and inserting a hyperlink. (The VBA code part is omitted, because the code provided in the original text needs to be run separately and cannot be rendered directly here.)
Create a link to return to the directory table
If your workbook has many sheets, it can be helpful to add a hyperlink to each worksheet that returns to the home directory page.
First, open the worksheet to which you want to add a return link, and then select the cell where you want to display the link. Next, go to "Insert" > "Link" > "Place in this document". Select the main worksheet and type "Catalog Page" as the display text.
You have now created a link that will be returned to your home directory page when clicked. You can easily copy this link and paste it on all other worksheets.
Whether you are dealing with a small number of worksheets or large workbooks, these methods can help you create directories efficiently.
The above is the detailed content of How to Add a Table of Contents to Excel (And Why You Should). For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Quick Links Parentheses: Controlling the Order of Opera

This guide will walk you through how to customize, move, hide, and show the Quick Access Toolbar, helping you shape your Outlook workspace to fit your daily routine and preferences. The Quick Access Toolbar in Microsoft Outlook is a usefu

Ever played the "just one quick copy-paste" game with Google Sheets... and lost an hour of your life? What starts as a simple data transfer quickly snowballs into a nightmare when working with dynamic information. Those "quick fixes&qu

Quick LinksRecalculating Formulas in Manual Calculation ModeDebugging Complex FormulasMinimizing the Excel WindowMicrosoft Excel has so many keyboard shortcuts that it can sometimes be difficult to remember the most useful. One of the most overlooked

Quick Links Copy, Move, and Link Cell Elements

1. Check the automatic recovery folder, open "Recover Unsaved Documents" in Word or enter the C:\Users\Users\Username\AppData\Roaming\Microsoft\Word path to find the .asd ending file; 2. Find temporary files or use OneDrive historical version, enter ~$ file name.docx in the original directory to see if it exists or log in to OneDrive to view the version history; 3. Use Windows' "Previous Versions" function or third-party tools such as Recuva and EaseUS to scan and restore and completely delete files. The above methods can improve the recovery success rate, but you need to operate as soon as possible and avoid writing new data. Automatic saving, regular saving or cloud use should be enabled

Quick Links Let Copilot Determine Which Table to Manipu

Microsoft Teams is not complicated to use, you can get started by mastering the basic operations. To create a team, you can click the "Team" tab → "Join or Create Team" → "Create Team", fill in the information and invite members; when you receive an invitation, click the link to join. To create a new team, you can choose to be public or private. To exit the team, you can right-click to select "Leave Team". Daily communication can be initiated on the "Chat" tab, click the phone icon to make voice or video calls, and the meeting can be initiated through the "Conference" button on the chat interface. The channel is used for classified discussions, supports file upload, multi-person collaboration and version control. It is recommended to place important information in the channel file tab for reference.
