I'm curious to know if there's a way to create a Table of Contents within a Google Sheets. I would like to be able to set the active cell in the spreadsheet based on what cell (or contents of the cell like a hyperlink) in the TOC is clicked.

It doesn't look like there is a way to do this with hyperlinks as they only can link you to a spreadsheet but not any specific cell or sheet.

Perhaps some code could capture a cell clicked event and set the active cell accordingly?

  • Can you share a spreadsheet with us? Jan 2 '13 at 8:31
  • 1
    I've since discovered that hyperlinks can be used to bring you to a specific sheet by using docs.google.com/a/DOMAIN/spreadsheet/ccc?key=YOUR_DOC_ID#gid=X where X is the index of the sheet starting with 0 but this still is not targeted enough for what I'm trying to do. I need to get to a specific target cell. @JacobJanTuinstra Any ol spreadsheet will do. Why do you want me to share a specific one with you? Feb 27 '13 at 21:03
  • 1
    Having an example file with the expected outcome, gives much more clarity. I for sure am better off with a shared file. It's your choice. Feb 28 '13 at 7:21
  • @JacobJanTuinstra Here's an example -- SpreadSheet Apr 4 '13 at 19:28

I guess further progress given the time elapsed because what I think you require is very simple. Select A1 in Sheet1, click on the link icon in the menu bar, enter:


for Link and click Apply.

  • 1
    Only took 5 years - "With this new functionality, you can create a “table of contents” for your spreadsheet..." announcement Jan 29 '18 at 4:07

I know this is old, but I made a utility that might help others who also stumble onto this question.

Like everyone else, I needed a table of contents system for Google Sheets but didn't want to have to spend time hand-making one, so I made this nifty script that'll generate one for you and also supply a sidebar that has an outline dropdown for easy navigation (similar to how outlines in other Google Docs work). All you have to do is format your sheet a bit for it, but that really doesn't take much time compared to actually hand-linking all of the cells.

You can get it here along with its source code: https://github.com/SkyAphid/GoogleSheetsTableOfContents

  • Please add all the the most relevant details of the linked resource because it could be unavailable in the future for any reason.
    – Rubén
    Dec 22 '18 at 23:21
  • I would, but there's not really any details to include. What I linked is just a short script to essentially perform pnuts answer for you.
    – Anon
    Jan 27 '19 at 16:45
  • 1
    If it's a short script, then add the code here.
    – Rubén
    Jan 27 '19 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.