Applications like Microsoft Word, Power Point, PDFs – all have option to create Table Of Contents. Well, Excel is an excellent tool – why shouldn’t it have a table of contents too? There are instances when you have lot many sheet in a workbook and all you need is a table of contents at the beginning for easy navigation.
Here is a ready to use Excel Macro to create table of contents of all the worksheets names. This macro creates a new worksheet as first sheet and create links to all worksheets in the workbook.
'This macro adds the TOC as first sheet in the workbook
'with name as "TOC"
Dim sheetNum As Long
'Removing previous TOC if any
On Error Resume Next
On Error GoTo 0
'Adding a new TOC
ActiveSheet.Name = "TOC"
For sheetNum = 1 To Sheets.Count
Anchor:=ActiveSheet.Cells(sheetNum, 1), _
SubAddress:="'" & Sheets(sheetNum).Name & "'!A1", _
Please feel free to leave your queries, feedback and suggestions in the comments section below.