How can i get a list of all sheets?

  1. Column
  2. TECHNOLOGY Q&A

By J. Carlton Collins, CPA


Q. I have an Excel workbook with dozens of custom-named worksheets. Is it possible to create a list of those worksheet names in Excel without having to retype them?

A. Yes, you can create a list of your Excel workbook's worksheet names as follows. From the Formulas tab, select Defined Names, Define Name to launch the New Name dialog box pictured below.

How can i get a list of all sheets?


Enter SheetNames into the Name field, enter the following formula into the Refers to field: =REPLACE(GET.WORKBOOK(1),1,FIND("]",GET.WORKBOOK(1)),""), and then select OK. This action will create a named formula that can then be used in conjunction with the INDEXfunction to produce a list of worksheet names. Continuing, let us assume you have 25 named worksheets. Next, select a cell where you want your list of names to appear (cell B2 in this example), and enter the numbers 1 through 25 (in cells A2 through A26 in this example, as pictured below). Then in cell B2 enter the formula =INDEX(SheetNames,A2), and then copy and paste the formula down 25 rows. These formulas will return a list of the names of your worksheet tabs in the same order as your worksheet tabs.

(Note: The workbook must be saved as an Excel Macro-Enabled Workbook file type in order to retain the Defined Name formula.)

How can i get a list of all sheets?


Now that you have successfully added a table of contents to your workbook, I recommend you add hyperlinks as well, to aid navigation. This can be done by adding the formula =HYPERLINK("#'"&B2&"'!A1","Go To Sheet") in cell C2 (in the example below) and copying this formula down next to each of the worksheet names.

How can i get a list of all sheets?


As a result, you will then be able to click each link to jump to the various worksheets listed in your table of contents. (As an alternative, you could instead select each name in the table of contents one at a time and press Ctrl+Kto apply a hyperlink directly to each worksheet name. The advantage of this alternative approach is that the separate column of hyperlinks (such as column C in the example above) is not necessary, but the disadvantage is that each hyperlink must be applied one at a time.)

Further, I recommend you insert a button on each worksheet that will return you to your table of contents, as follows:

  1. Name your table of contents. Start by placing your cursor at the top of the table of contents and in the Name Box (located directly above column A), type TOC and press the Enter key. This named location will be the cell where the navigational button created in the steps below will lead.
  2. Create a hyperlinked text box button. Anywhere in the workbook, insert a Text Box (from the Insert tab's Shapes menu), label it Return to the Table of Contents, and format the button to your desire. (In the example pictured below, I made the Text Box red, centered and bolded the text, applied a button effect, and applied a bottom right shadow.)
  3. Apply a hyperlink to your text box button. Right-click the text box to select it, press Ctrl+K to launch the Insert Hyperlink dialog box, select Place in This Document (under the Link to menu), scroll down to Defined Names,select TOC, and press OK. These actions will create a clickable button that will return you to your table of contents.
  4. Copy and paste the hyperlinked text box button throughout your worksheet. Right-click the text box button again to select it, left-click on the very edge of the text box button to ensure you have selected the entire text box button and not just the text within the text box, press Ctrl+C to copy the text box button, then navigate to each worksheet and paste the text box button on each of your worksheets to make navigating your large workbook easier. (You might want to paste several copies of this text box button on your larger worksheets for added navigation convenience.)

How can i get a list of all sheets?


(Hint: To select a hyperlink-enabled text box without triggering the hyperlink effect, right-click the text box button and then left-click the very edge of the text box button — this action will allow you to resize or reposition the button as desired.) You can download an example Excel workbook containing a table of contents and navigational hyperlinks at carltoncollins.com/list.xlsm.


About the author

J. Carlton Collins () is a technology consultant, a conference presenter, and a JofA contributing editor.

Submit a question

Do you have technology questions for this column? Or, after reading an answer, do you have a better solution? Send them to . We regret being unable to individually answer all submitted questions.

How can I get a list of all sheets in Excel?

First ensure that the Show sheet tabs is enabled. To do this, For all other Excel versions, click File > Options > Advanced—in under Display options for this workbook—and then ensure that there is a check in the Show sheet tabs box.

How do I get a list of all Google Sheets?

Follow these steps to use the SHEETNAMES custom function to list all sheet names in Google Sheets..
Select any cell and type your header such as Sheet Names..
Select the cell below. In this example, cell C5 is selected..
Type =SHEETNAMES() and press the Enter key..

How do I print a list of tabs in Excel?

The easiest approach is to right-click a worksheet tab, choose Select All Sheets, and then print normally to have the worksheets printed as a single print job. As an alternative you could also select File, Print, Settings, Print Entire Workbook to achieve the same result.

How do I export all sheets?

By default, Excel will only export the active worksheet. If you have multiple worksheets and want to save all of them in the same PDF file, click Options in the Save As dialog box. The Options dialog box will appear. Select Entire workbook, then click OK.