79447889

Date: 2025-02-18 10:33:22
Score: 1
Natty:
Report link

Came this way looking for an answer. Thought I'd share my learning. I have two sheets - summary and details - which have a 1:m relationship. I want to make a cell in 'summary' a hyperlink I can click on and switch to 'details' filtered on that value. Here's how I did it...

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
    ' column a = 1
    Sheet2.Range("A1", "B425").AutoFilter 1, Target.Parent.Value
End Sub

There are two ways to create a hyperlink:

  1. right click a cell. Select link > insert link. Make the link a link to place in this document.

  2. use the =HYPERLINK(location, value) function to create a hyperlink

Regardless, the above code is called when you click a hyperlink.

Reasons:
  • Blacklisted phrase (1): this document
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • Has code block (-0.5):
Posted by: Clarius