ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Pulling Embedded LInk Out of Cell (https://www.excelbanter.com/excel-discussion-misc-queries/83246-pulling-embedded-link-out-cell.html)

bobbabuoy

Pulling Embedded LInk Out of Cell
 

I have a list of sites (ex-"Running Site") in an excel column that are
formatted as links (ie: a browser with a link opens when you click on
the cell). I want to write a macro that will pull the links out of the
cell and write them to a text file or an adjacent column. How can I do
that? I basically just need the line of code that will identify the
link that is embedded in the cell.

Thanks~


--
bobbabuoy
------------------------------------------------------------------------
bobbabuoy's Profile: http://www.excelforum.com/member.php...o&userid=33491
View this thread: http://www.excelforum.com/showthread...hreadid=532907


Gary''s Student

Pulling Embedded LInk Out of Cell
 
If A1 contains a hyperlink then

=hyp2(A1) will display the link

Enter this tiny UDF:

Function hyp2(r As Range) As String
hyp2 = r.Hyperlinks(1).Address
End Function

--
Gary's Student


"bobbabuoy" wrote:


I have a list of sites (ex-"Running Site") in an excel column that are
formatted as links (ie: a browser with a link opens when you click on
the cell). I want to write a macro that will pull the links out of the
cell and write them to a text file or an adjacent column. How can I do
that? I basically just need the line of code that will identify the
link that is embedded in the cell.

Thanks~


--
bobbabuoy
------------------------------------------------------------------------
bobbabuoy's Profile: http://www.excelforum.com/member.php...o&userid=33491
View this thread: http://www.excelforum.com/showthread...hreadid=532907



Duke Carey

Pulling Embedded LInk Out of Cell
 
activecell.Hyperlinks(1).Address


"bobbabuoy" wrote:


I have a list of sites (ex-"Running Site") in an excel column that are
formatted as links (ie: a browser with a link opens when you click on
the cell). I want to write a macro that will pull the links out of the
cell and write them to a text file or an adjacent column. How can I do
that? I basically just need the line of code that will identify the
link that is embedded in the cell.

Thanks~


--
bobbabuoy
------------------------------------------------------------------------
bobbabuoy's Profile: http://www.excelforum.com/member.php...o&userid=33491
View this thread: http://www.excelforum.com/showthread...hreadid=532907




All times are GMT +1. The time now is 06:01 PM.

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