Untitled

 avatar
unknown
plain_text
a month ago
380 B
4
Indexable
Function ExtractURL(rng As Range) As String

    ' Checks if the first cell in the specified range contains hyperlink
    If rng(1).Hyperlinks.Count <> 1 Then
    
        ' If not, returns an empty string
        ExtractURL = ""
    
    Else
        
        ' If there is a hyperlink, returns its URL
        ExtractURL = rng.Hyperlinks(1).Address
    
    End If

End Function
Editor is loading...
Leave a Comment