Forum Discussion
ali3chat
Oct 24, 2020Copper Contributor
Looking for Help to Select Cells Containing Hyperlink Text Only
I am trying to filter cells or select cells that only contain hyperlink text. Is there an easy formula or filter feature I can use for this? Potentially a regex filter example? Thank you in advan...
HansVogelaar
Oct 25, 2020MVP
You might use this macro:
Sub SelectHyperlinks()
Dim wsh As Worksheet
Dim hyp As Hyperlink
Dim rng As Range
Set wsh = ActiveSheet ' or specify the sheet
For Each hyp In wsh.Hyperlinks
If rng Is Nothing Then
Set rng = hyp.Range
Else
Set rng = Union(rng, hyp.Range)
End If
Next hyp
If rng Is Nothing Then
MsgBox "No Hyperlinks", vbInformation
Else
rng.Select
End If
End Sub