Copy Hyperlink to other cell

PRIMA

Well-known Member
Joined
Oct 12, 2008
Messages
554
Dear All, how can I copy and paste only the hyperlink of one cell to the other cell with the same worksheet or workbook? I am using Excel 2010. Thanks
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi Andrew, thank you for the prompt reply, what I want is to copy only the hyperlink excluding the text to display, I have already the text display in another cell. Is it possible to copy only the hyperlink. thanks again
 
Upvote 0
Thank you Andrew, can you share me the code, assuming I have a list of Hyperlink in column A and I want it to copy in Column B. Thank you so much for your time.
 
Upvote 0
Try:

Code:
Sub Test()
    Dim Rng As Range
    Dim Cell As Range
    With ActiveSheet
        Set Rng = .Range("A1:A" & .Range("A" & .Rows.Count).End(xlUp).Row)
            For Each Cell In Rng
                With Cell
                    If .Hyperlinks.Count > 0 Then
                        .Parent.Hyperlinks.Add Anchor:=.Offset(0, 1), Address:=.Hyperlinks(1).Address, TextToDisplay:=.Offset(0, 1).Value
                    End If
                End With
            Next Cell
    End With
End Sub
 
Upvote 0
I copied the code and paste it in Module 1, but I noticed that nothing change. I may missed something. Thank you
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,685
Members
448,977
Latest member
dbonilla0331

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top