Question : Convert  hyperlinks from '=HYPERLINK()' to 'embedded' links

Hello folks,

Is it possible to convert hyperlinks created using '=HYPERLINK()'  to the 'embedded' type? (Hope so as I've a large number of links.)

Thanks....

Answer : Convert  hyperlinks from '=HYPERLINK()' to 'embedded' links

This does not sound like something you will use very often so I did not worry too much about making this code very friendly.  Copy it into a standard module or into your personal macro workbook.  Activate any worksheet which contains the formulas and this will convert them.

Have a nice day!  Tom
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
Sub BasicExample()
    Dim r As Range, Str
    
    For Each r In UsedRange
        If Left(r.Formula, 10) = "=HYPERLINK" Then
            Str = Replace(r.Formula, "=HYPERLINK(", "")
            Str = Left(Str, Len(Str) - 1)
            Str = Replace(Str, Chr(34), "")
            Str = Split(Str, ",")
            r.Formula = ""
            r.Hyperlinks.Add r, Str(0), , , Str(1)
        End If
    Next
End Sub
Random Solutions  
 
programming4us programming4us