Hi-
I have a sheet with some cells including a javascript command (such that they look like hyperlink cells, but aren’t exactly).
And am looking for a way to identify these cells via a formula.
Below is an example I tracked down before understanding exactly what my problem was that gives a good idea what I’m hoping to do in case I haven’t explained well.
TIA,
Brian
http://excel.tips.net/T003281_Extracting_URLs_from_Hyperlinks.html
Instead of a "brute force" macro, you could also create a user-defined function that would extract and return the URL for any hyperlink at which it was pointed:
Function GetURL(rng As Range) As String
On Error Resume Next
GetURL = rng.Hyperlinks(1).Address
End Function
In this case you can place it where you want. If you want, for example, the URL from a hyperlink in A1 to be listed in cell C25, then in cell C25 you would enter the following formula:
=GetURL(A1)
I have a sheet with some cells including a javascript command (such that they look like hyperlink cells, but aren’t exactly).
And am looking for a way to identify these cells via a formula.
Below is an example I tracked down before understanding exactly what my problem was that gives a good idea what I’m hoping to do in case I haven’t explained well.
TIA,
Brian
http://excel.tips.net/T003281_Extracting_URLs_from_Hyperlinks.html
Instead of a "brute force" macro, you could also create a user-defined function that would extract and return the URL for any hyperlink at which it was pointed:
Function GetURL(rng As Range) As String
On Error Resume Next
GetURL = rng.Hyperlinks(1).Address
End Function
In this case you can place it where you want. If you want, for example, the URL from a hyperlink in A1 to be listed in cell C25, then in cell C25 you would enter the following formula:
=GetURL(A1)