ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Convert urls to links (https://www.excelbanter.com/excel-discussion-misc-queries/112793-convert-urls-links.html)

ellen

Convert urls to links
 
Hello,
I have an Excel document with a column of urls that I'd like to convert to
links. There is nothing in this column except the urls. Is there a way to
convert them en mass?

Thanks,
Ellen

PCLIVE

Convert urls to links
 
You could use some VBA code.
Press Alt+F11 to bring up the VB editor. Next, right-click "ThisWorkbook"
and goto "Insert" and then select "Module".
Paste the following code:

For Each cell In Range("A1:A" & Range("A65536").End(xlUp).Row)
cell.Hyperlinks.Add Anchor:=cell, Address:= _
cell.Value, TextToDisplay:=cell.Value
Next cell




This code assumes that your URLs are in column A.
HTH,
Paul




"Ellen" wrote in message
...
Hello,
I have an Excel document with a column of urls that I'd like to convert to
links. There is nothing in this column except the urls. Is there a way
to
convert them en mass?

Thanks,
Ellen




ellen

Convert urls to links
 
Thanks for your help, Paul. After doing a little checking out, I preceded
your code with "Sub url()" and ended it with "End sub". The code worked
beautifully!!
Ellen

"PCLIVE" wrote:

You could use some VBA code.
Press Alt+F11 to bring up the VB editor. Next, right-click "ThisWorkbook"
and goto "Insert" and then select "Module".
Paste the following code:

For Each cell In Range("A1:A" & Range("A65536").End(xlUp).Row)
cell.Hyperlinks.Add Anchor:=cell, Address:= _
cell.Value, TextToDisplay:=cell.Value
Next cell




This code assumes that your URLs are in column A.
HTH,
Paul




"Ellen" wrote in message
...
Hello,
I have an Excel document with a column of urls that I'd like to convert to
links. There is nothing in this column except the urls. Is there a way
to
convert them en mass?

Thanks,
Ellen






All times are GMT +1. The time now is 05:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com