Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How can I copy/paste a hyperlink address without the link?
I have a column of church names that have a hyperlink to their websites. How
can I copy just the website links from the church names to create a separate website column? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How can I copy/paste a hyperlink address without the link?
Hi Voluptas,
Try: '============= Public Sub Tester() Dim WB As Workbook Dim SH As Worksheet Dim rng As Range Dim rCell As Range Dim iLastRow As Long Dim HL As Hyperlink Const col As String = "A:A" '<<==== CHANGE Set WB = Workbooks("YourBook.xls") '<<==== CHANGE Set SH = WB.Sheets("Sheet1") '<<==== CHANGE iLastRow = Cells(Rows.Count, col).End(xlUp).Row Set rng = SH.Range(Cells(1, col), Cells(iLastRow, col)) SH.Columns(col).Offset(, 1).Insert For Each rCell In rng.Cells With rCell On Error Resume Next .Offset(0, 1).Value = .Hyperlinks(1).Address On Error GoTo 0 End With Next rCell End Sub '<<============= If you are not familiar with macros, you may wish to visit David McRitchie's 'Getting Started With Macros And User Defined Functions' at: http://www.mvps.org/dmcritchie/excel/getstarted.htm --- Regards, Norman "voluptas" wrote in message ... I have a column of church names that have a hyperlink to their websites. How can I copy just the website links from the church names to create a separate website column? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Moving rows with Hyperlink doesn't move hyperlink address | Excel Discussion (Misc queries) | |||
link address book to invoice | Excel Discussion (Misc queries) | |||
Excel email address hyperlink does not update | Excel Discussion (Misc queries) | |||
Replace part of link address in a cell with a value(date) from ano | Excel Discussion (Misc queries) | |||
Can you make a Excel hyperlink connect to an outlook address card | Excel Discussion (Misc queries) |