Make a liste of all sheets in one sheet in specific column and hyperlink it with the resoective sheet.

Chaturvedi, Santosh 430 Reputation points
2026-06-23T09:48:43.25+00:00

Hello - I have 150 sheets named differently in one workbook (see below)

I want to liste them out in sheet "Guage_Liste_DB" in cell D4 onwards and hyperlink with the respective sheet.

I have this macro but not able to liste them in Guage_Liste_DB sheet in cell D4 onwards and hyperlink them

Please modfiy it for my usgae.


User's image


The macro is as below..

Sub ExtractSheetsWithHyperlinks()

Dim ws As Worksheet

Dim targetSheet As Worksheet

Dim rowNum As Long

Dim sheetName As String



' Speed up the macro execution

Application.ScreenUpdating = False



' Add a new worksheet at the front to safely store the links

Set targetSheet = Worksheets.Add(Before:=Worksheets(1))

targetSheet.Name = "Workbook_Index"



' Create a bold header row

With targetSheet.Range("A1")

    .Value = "Sheet Directory (Click to Navigate)"

    .Font.Bold = True

    .Font.Size = 12

End With



' Start writing links on row 2

rowNum = 2



' Loop through every sheet in the workbook

For Each ws In ThisWorkbook.Worksheets

    ' Skip the index sheet itself

    If ws.Name <> targetSheet.Name Then

        sheetName = ws.Name

        

        ' Create the hyperlink targeting cell A1 of each sheet

        ' Uses single quotes to handle sheet names with spaces properly

        targetSheet.Hyperlinks.Add _

            Anchor:=targetSheet.Cells(rowNum, 1), _

            Address:="", _

            SubAddress:="'" & sheetName & "'!A1", _

            TextToDisplay:=sheetName

            

        rowNum = rowNum + 1

    End If

Next ws



' Auto-fit the column so names aren't clipped

targetSheet.Columns("A").AutoFit



' Restore screen updating

Application.ScreenUpdating = True



' Completion notification

MsgBox "Generated " & (rowNum - 2) & " hyperlinks successfully!", vbInformation, "Done"

End Su

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

Answer accepted by question author
Anonymous
2026-06-23T10:36:43.74+00:00

Hi @Chaturvedi, Santosh,

Thank you for posting your question in the Microsoft Q&A forum.

From your description, you’d like to generate a list of all worksheets in your workbook, starting in column D (cell D4 onwards) of the sheet "Guage_Liste_DB", with each entry hyperlinked to its respective sheet. For this scenario, please try the following macro:

Sub ExtractSheetsWithHyperlinks()

    Dim ws As Worksheet
    Dim targetSheet As Worksheet
    Dim rowNum As Long
    Dim sheetName As String

    ' Speed up the macro execution
    Application.ScreenUpdating = False

    ' Set the target sheet explicitly
    Set targetSheet = ThisWorkbook.Worksheets("Guage_Liste_DB")

    ' Start writing links at row 4, column D
    rowNum = 4

    ' Loop through every sheet in the workbook
    For Each ws In ThisWorkbook.Worksheets
        ' Skip the target sheet itself
        If ws.Name <> targetSheet.Name Then
            sheetName = ws.Name

            ' Create the hyperlink targeting cell A1 of each sheet
            targetSheet.Hyperlinks.Add _
                Anchor:=targetSheet.Cells(rowNum, 4), _
                Address:="", _
                SubAddress:="'" & sheetName & "'!A1", _
                TextToDisplay:=sheetName

            rowNum = rowNum + 1
        End If
    Next ws

    ' Auto-fit column D so names aren't clipped
    targetSheet.Columns("D").AutoFit

    ' Restore screen updating
    Application.ScreenUpdating = True

    ' Completion notification
    MsgBox "Generated " & (rowNum - 4) & " hyperlinks successfully!", vbInformation, "Done"

End Sub

I tested this with a workbook containing 30 sheets. User's image

After running the macro, the sheet Guage_Liste_DB displayed a clean list of all sheet names in column D starting at row 4, each with a clickable hyperlink that navigates directly to the corresponding sheet.

User's imageUser's image

Thank you again for your time and understanding. I really appreciate your patience, and I’m here to help. Looking forward to your response!                      


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".                 

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread      

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Chaturvedi, Santosh 430 Reputation points
    2026-06-23T10:47:08.2133333+00:00

    This is perfectly working-- Have a nice day !

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.