Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
A1=[URL unfurl="true"]http://www.google.com[/URL]
A2=HYPERLINK(A1,Google)
Sub Hyperlink-2-txt()
Dim result
Dim shp As Shape
result = MsgBox("Warning, this will overwrite anything in the adjacent column for each hyperlink in the active worksheet", vbOKCancel)
If result = vbCancel Then Exit Sub
For Each shp In ActiveSheet.Shapes
'Here we write the address of the hyperlink (the
'URL) to the cell that is one column to the right
'of the cell that the picture's bottom right
'corner touches. If there's something in that cell
'it will be overwritten, so this line may need to
'be adjusted to make sure we're writing to a blank
'cell
shp.BottomRightCell.Offset(0, 1).Value = shp.Hyperlink.Address
'This tells the For Next loop to go to the next shape
Next shp
End Sub
Sub ConvertHyperlinks()
'David McRitchie, misc, 2000-01-17, misc
'[URL unfurl="true"]http://www.mvps.org/dmcritchie/excel/buildtoc.htm[/URL]
Dim cell As Range
Dim hyperlinkaddress As String, hyperlinkformula As String
For Each cell In Selection
On Error GoTo skipHyper
hyperlinkaddress = cell.Hyperlinks(1).Address
On Error GoTo 0
If hyperlinkaddress = "" Then GoTo skipHyper
hyperlinkformula = cell.Formula
If Left(hyperlinkformula, 1) = "=" Then
hyperlinkformula = Right(hyperlinkformula, Len(hyperlinkformula) - 1)
Else
hyperlinkformula = Replace(hyperlinkformula, """", """""")
hyperlinkformula = """" & hyperlinkformula & """"
End If
cell.Formula = "=HYPERLINK(""" & hyperlinkaddress & _
"""," & hyperlinkformula & ")"
skipHyper: On Error GoTo 0
Next cell
On Error GoTo 0
Selection.Hyperlinks.Delete
For Each cell In Selection
cell.Formula = cell.Formula
Next cell
End Sub
Function hyperlinkaddress(cell)
On Error Resume Next
hyperlinkaddress = cell.Hyperlinks(1).Address
If hyperlinkaddress = 0 Then hyperlinkaddress = "no link"
End Function
Function HyperlinkScreenTip(cell)
On Error Resume Next
HyperlinkScreenTip = cell.Shapes(1).Hyperlinks(1).ScreenTip
If HyperlinkScreenTip = 0 Then HyperlinkScreenTip = "no link"
End Function
Function GetURL(Rng As Range) As String
Application.Volatile
Set Rng = Rng(1)
If Rng.Hyperlinks.Count = 0 Then
GetURL = ""
Else
GetURL = Rng.Hyperlinks(1).Address
End If
End Function