Forum Discussion
Sylvia2047
Aug 29, 2022Copper Contributor
How to compare hyperlinks
Hi all, I would like to pick your brains on how I could compare hyperlinks in 2 different cells. The links that I want to compare are embedded links, i.e. the cell displays a set of texts (e.g. Com...
- Aug 29, 2022
Create the following custom function in a module in the Visual Basic Editor:
Function HyperlinkAddress(cell As Range) As String On Error Resume Next HyperlinkAddress = cell.Hyperlinks(1).Address End Function
Let's say you have hyperlinks in A2 and down.
Enter the following formula in B2, then fill down:
=HyperlinkAddress(A2)
You can then highlight duplicates in column B.
HansVogelaar
Aug 29, 2022MVP
Create the following custom function in a module in the Visual Basic Editor:
Function HyperlinkAddress(cell As Range) As String
On Error Resume Next
HyperlinkAddress = cell.Hyperlinks(1).Address
End Function
Let's say you have hyperlinks in A2 and down.
Enter the following formula in B2, then fill down:
=HyperlinkAddress(A2)
You can then highlight duplicates in column B.
- Sylvia2047Aug 30, 2022Copper Contributor
HansVogelaar
Thank you very much! That's great help!