Create links to all sheets in a workbook
The macro demonstrated below creates hyperlinks to all sheets in current workbook. Select a start cell and then run macro CreateLinksToAllSheets().
VBA code
Sub CreateLinksToAllSheets()
Dim sh As Worksheet
Dim cell As Range
For Each sh In ActiveWorkbook.Worksheets
If ActiveSheet.Name <> sh.Name Then
ActiveCell.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"'" & sh.Name & "'" & "!A1", TextToDisplay:=sh.Name
ActiveCell.Offset(1, 0).Select
End If
Next sh
End Sub
Explaining vba code
Step 1 - Open VBA Editor
You write macros in the Visual Basic Editor. Open the Visual Basic Editor using one of these instructions:
- Press Alt+F11
- Go to tab Developer and click Visual basic "button"
Step 2 - Create a module
A macro procedure is stored in a code module. Let´s create a module.
- Right click on your workbook in the project explorer.
- Click Insert | Module.

Step 3 - Write macro
Click in code module window. Here you write vba code.
Sub CreateLinksToAllSheets()
All macros start with Sub and end with End Sub.
Dim sh As Worksheet
This line declares sh as a worksheet object.
Dim cell As Range
Cell is declared a range object. A range object can contain a single cell or multiple cells.
For Each sh In ActiveWorkbook.Worksheets
Each worksheet in active workbook is stored in sh, one by one.
If ActiveSheet.Name <> sh.Name Then
This If ... then line avoids linking to active worksheet.
ActiveCell.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
sh.Name & "!A1", TextToDisplay:=sh.Name
Create a hyperlink to current worksheet sh in active cell.
ActiveCell.Offset(1, 0).Select
Select next cell below active cell.
End If
Next sh
Go back to the "For each" statement and store next worksheet in sh worksheet object.
End Sub
Download excel *.xlsm file
Create-Links-To-All-Sheets-in-a-Workbook.xlsm
Related posts:
Quickly create links to sheets, tables, pivot tables and named ranges in a workbook
Excel vba: Select cell A1 on all sheets before you close a workbook
Quickly create new sheets (vba)
Excel 2007 vba: Create a custom-made item on the shortcut menu


















[...] How to create links to all sheets in a workbook [Get Digital Help] [...]
Hello MR Oscar Cronquist!
I have the following query after a long search found some things, but not exactly what I need. I have 25 workbooks with worksheets 8-10. The tables are all quite large. So I found a few macros that do not help me to get the following:
For example: open excel spreadsheet with macro example (book1) and a button to retrieve it (activated) - This workbook is the folder with all the other workbooks, start looking for the word "cucumber" and starts the macro to search all workbooks, worksheets and cells. Then in (book1) as in column A:A to I display exactly what workbook and worksheet which cell is the word or words. After appearing in column A:A search word where I can make a link to a worksheet. Consider the example made of you - how to export worksheets but only for one workbook, but to me it's different. Many thanks in advance.
Example:
C:\Users\Nevi_\Desktop\trii\[Book1.xls]Sheet1
Book4455.xls
Sheet8;E34;G2;B12
Sheet2;A2;b23;AC98
Book12.xls
Which Sheet;Which Cells
Which Sheet;Which Cells
dasds.xls
Which Sheet;Which Cells
Which Sheet;Which Cells
Book124554.xls
Which Sheet;Which Cells
Which Sheet;Which Cells
Bookvsdsdsd.xls
Which Sheet;Which Cells
Which Sheet;Which Cells
Which Sheet;Which Cells
Which Sheet;Which Cells
Which Sheet;Which Cells
Which Sheet;Which Cells
Which Sheet;Which Cells
cucu.xls
Which Sheet;Which Cells
Which Sheet;Which Cells
and next one
and next one
and next one
and next one
Hello Mr. Oscar
that could be a solution to my (for me personally) huge problem?
Thank you
Kosta,
I don´t have an answer for you. Your question is complicated.