Skip to content
// field note2026 · Dec 13 min read

Create a clickable table of contents for tabs in Google Sheets.

Give readers one place to start

For one or two links, select a cell, choose Insert → Link and pick a sheet from the list. For a workbook that gains a new tab every month, generate a clickable directory in one pass. The example creates a tab called Tab index and writes a link to each visible worksheet in column A.

The link points to the sheet ID in the URL. A tab can move or change its name and keep the same ID. Refresh the index when you want its labels, order and visible tabs to match the workbook again.

Try it in a three-tab workbook

In a blank spreadsheet, name three tabs January, February and Internal notes. Hide Internal notes. Open Extensions → Apps Script, paste the complete script below into the editor and save. Select refreshTabIndex, click Run and review the access request. The script acts on the current spreadsheet. You can close the editor after it finishes.

Open Tab index. A1 should read “Jump to a tab”. The next two cells should say January and February. Follow the February link and check which tab opens. Internal notes and the index itself are omitted.

Check the result after a rename or deletion

Rename February to February actuals and try its existing link. It should open the renamed tab. Run refreshTabIndex again and the label should update. Delete January from this practice workbook, run the script again and the old link should disappear.

In your own workbook, reserve column A of Tab index for the generated list, and keep its name and the note on A1. The script checks that note before writing to an existing index. If someone already owns a tab with that name, it stops so you can rename the existing tab or change the output name in the script. To undo the example, delete the generated tab and remove the function.

Skip the boilerplate.

Describe the automation and Gnaw drafts an Apps Script starting point. Review its permissions and test with sample data before using it. Free, no login.