View Single Post
  #3   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
papou[_2_] papou[_2_] is offline
external usenet poster
 
Posts: 112
Default Copy actual URL from hyperlink cell

Hello Ian
You don't say whether you actually want the other column to show URL value
as hyperlink?
Anyway amend this code and try and see if it suits your needs:

Sub PlaceUrls()
Dim rg As Range
For Each rg In Range("C1:C10")
If rg.Hyperlinks.Count < 0 Then
rg.Offset(0, 1).Value = rg.Hyperlinks(1).Address
End If
Next rg
End Sub

HTH
Cordially
Pascal

"IAN" a écrit dans le message de news:
...
I have a spreadsheet with thousands of records. One column contains
hyperlinks either created manually using the Insert-Hyperlink action
or via a =HYPERLINK() dynamic formula.

I need to return the URL for the cyperlink column into another column
so that I can use it for some other purpose. The new cells would
simply contain text like
http://website/folder/file.htm.

I couldn't find a function that returned the URL, so I'm wondering if
there is another way to get the info? A macro possibly?

Thanks for your help
IAN