G
Guest
How do I retrieve the url portion of a cell that has a hyperlink stored int
it. The value function only returns the readable text.
it. The value function only returns the readable text.
David McRitchie said:Hi Polb and Gary's,
If there is no hyperlink I think you would get zero
try
Function HyperlinkAddress(cell) As String
If cell.Hyperlinks.Count > 0 Then _
HyperlinkAddress = cell.Hyperlinks(1).Address
End Function
to use:
=personal.xls!hyperlinkaddress(A1)
more informiation an variations see
http://www.mvps.org/dmcritchie/excel/buildtoc.htm#Hyperlinkaddress
FrozenRope said:I feel like a dork, but I'm not familiar with how to create a UDF or how to
work with personal.xls. Is there a primer that you can direct me to that can
help?
I have a 2,000 row spreadsheet where I need to extract the URL an embedded
column, and can't stand the thought of doing that by hand. ;o)
Thanks in advance for baby-sitting me on this!
David McRitchie said:Hi Polb and Gary's,
If there is no hyperlink I think you would get zero
try
Function HyperlinkAddress(cell) As String
If cell.Hyperlinks.Count > 0 Then _
HyperlinkAddress = cell.Hyperlinks(1).Address
End Function
to use:
=personal.xls!hyperlinkaddress(A1)
more informiation an variations see
http://www.mvps.org/dmcritchie/excel/buildtoc.htm#Hyperlinkaddress
---
HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
Gary''s Student said:If there is a hyperlink in C5, then the UDF
=hyp("C5") will return the URL
Here is the UDF:
Function hyp(r As String) As String
hyp = Range(r).Hyperlinks(1).Address
End Function
--
Gary's Student
:
How do I retrieve the url portion of a cell that has a hyperlink stored int
it. The value function only returns the readable text.
FrozenRope said:I feel like a dork, but I'm not familiar with how to create a UDF or how to
work with personal.xls. Is there a primer that you can direct me to that can
help?
I have a 2,000 row spreadsheet where I need to extract the URL an embedded
column, and can't stand the thought of doing that by hand. ;o)
Thanks in advance for baby-sitting me on this!
David McRitchie said:Hi Polb and Gary's,
If there is no hyperlink I think you would get zero
try
Function HyperlinkAddress(cell) As String
If cell.Hyperlinks.Count > 0 Then _
HyperlinkAddress = cell.Hyperlinks(1).Address
End Function
to use:
=personal.xls!hyperlinkaddress(A1)
more informiation an variations see
http://www.mvps.org/dmcritchie/excel/buildtoc.htm#Hyperlinkaddress
---
HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
If there is a hyperlink in C5, then the UDF
=hyp("C5") will return the URL
Here is the UDF:
Function hyp(r As String) As String
hyp = Range(r).Hyperlinks(1).Address
End Function
--
Gary's Student
:
How do I retrieve the url portion of a cell that has a hyperlink stored int
it. The value function only returns the readable text.