Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
voluptas
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Norman Jones
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving rows with Hyperlink doesn't move hyperlink address Samad Excel Discussion (Misc queries) 15 June 22nd 06 12:03 PM
link address book to invoice Marlis Excel Discussion (Misc queries) 4 June 19th 06 05:39 PM
Excel email address hyperlink does not update Michael Excel Discussion (Misc queries) 1 August 2nd 05 02:36 PM
Replace part of link address in a cell with a value(date) from ano Hakan Excel Discussion (Misc queries) 0 July 20th 05 12:39 PM
Can you make a Excel hyperlink connect to an outlook address card [email protected] Excel Discussion (Misc queries) 0 May 5th 05 09:30 PM


All times are GMT +1. The time now is 08:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"