How to expand a group in Excel with a hyperlink (or possibly assign a macro to a hyperlink)

I have a table at the top of my sheet, and this table has different section names. I would like to insert a hyperlink to these section names in order to navigate and open it below when I click on them.

Refer to the default view of my table and sections (collapsed)

I could create a macro that:

Expands all groups
Goes to the Section that I clicked,
Collapses all groups
Only opens the group on active cell, 

But assigning this macro to ~ 20 different partitions increases the file size.

After some searching, I found this on SO: Excel: assign macro to hyperlink? So, maybe there is a way to connect these two methods?

How can this be solved?

+1
source share
1 answer

- "" , . . , .

? , Excel . .

, , - VBA , . , . , .

Sub OpenSection()

Dim x As String
x = ActiveCell.Value

Dim y As String
y = Cells.Find(What:=(x), After:=ActiveCell, LookIn:=xlFormulas, _
    LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
    MatchCase:=False, SearchFormat:=False).Address
'Range("b1").Value = y

With ActiveSheet
    With .Range(y).EntireRow
        If .ShowDetail = False Then
            .ShowDetail = True
        Else
            .ShowDetail = False
        End If
    End With
End With
End Sub
+1

All Articles