Disappearing Hyperlink URL

Copper Contributor

I got a file with 2000 hyperlinks. The thing is I don't need these hyperlinks but the URL. I need to convert these hyperlinks to URL. I need a way to this fast and I need to now how. Can someone help me?

1 Reply

@Adrie0181 You can use a macro like this one. Make sure you run this against a copy of your file as this macro cannot be undone.

Option Explicit

Sub ReplaceHyperlinks()
    Dim aCell As Range
    For Each aCell In ActiveSheet.UsedRange
        If aCell.Hyperlinks.Count > 0 Then
            aCell.Value = aCell.Hyperlinks(1).Address
            aCell.Hyperlinks.Delete
        End If
    Next
End Sub