Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Copying a Hyperlink

0 views
Skip to first unread message

ACH

unread,
Nov 12, 2005, 8:46:22 AM11/12/05
to
I have a hyperlink in cell A1. I also want that exact same hyperlink in F1.
The scenario is the same for A2/F2, A3/F3 etc. Is there an easy way to copy
just the hyperlink from a cell without changing the text in the respective
cells?

ACH


Barb Reinhardt

unread,
Nov 12, 2005, 9:26:16 AM11/12/05
to
Try =hyperlink(a1) in f1.
"ACH" <sillyp...@hotmail.com> wrote in message
news:Ommdf.537746$_o.514276@attbi_s71...

Dave Peterson

unread,
Nov 12, 2005, 10:04:29 AM11/12/05
to
Maybe you could use a macro:

Option Explicit
Sub testme()

Dim myRng As Range
Dim myCell As Range
Dim myOtherCell As Range

With ActiveSheet
Set myRng = .Range("a2", .Cells(.Rows.Count, "A").End(xlUp))
For Each myCell In myRng.Cells
Set myOtherCell = myCell.Offset(0, 5)
If myCell.Hyperlinks.Count > 0 Then
If myOtherCell.Hyperlinks.Count > 0 Then
myOtherCell.Hyperlinks.Delete
End If
.Hyperlinks.Add _
Anchor:=myOtherCell, _
Address:=myCell.Hyperlinks(1).Address
End If
Next myCell
End With

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

--

Dave Peterson

0 new messages