Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
J J is offline
external usenet poster
 
Posts: 3
Default need a function or property to extract the hyperlink from a cell

I copy a list of hyperlinks with friendly names into a spreadsheet.
However, I want to extract the underlying hyperlinks into their own cells.
Is there a function or a property I can use in a macro to address the
hyperlink behind the friendly name?

Thx,

J

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default need a function or property to extract the hyperlink from a cell

Perhaps this User Defined Function:

Function GetHyperlink(rngCell As Range)
GetHyperlink = rngCell.Hyperlinks(1).Address
End Function

Then....
If Cell A1 contains the hyperlink,

This formula returns the web address of that hyperlink:
=GetHyperlink(A1)

Is that something you can work with?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"J" wrote in message
...
I copy a list of hyperlinks with friendly names into a spreadsheet.
However, I want to extract the underlying hyperlinks into their own cells.
Is there a function or a property I can use in a macro to address the
hyperlink behind the friendly name?

Thx,

J



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default need a function or property to extract the hyperlink from a cell

In A1 I entered this formula: =HYPERLINK("www.abc.ca","click for abc")
In B1 I use =GETLINK(A1) and this returned: www.abc.ca
The UDF is
Function getlink(mycell)
myform = mycell.Formula
If Mid(myform, 2, 9) = "HYPERLINK" Then
commapos = InStr(1, myform, ",")
getlink = Mid(myform, 13, commapos - 14)
Else
getlink = ""
End If
End Function

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"J" wrote in message
...
I copy a list of hyperlinks with friendly names into a spreadsheet.
However, I want to extract the underlying hyperlinks into their own cells.
Is there a function or a property I can use in a macro to address the
hyperlink behind the friendly name?

Thx,

J



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
How to extract a web address from a hyperlink cell? El Rebelde Excel Discussion (Misc queries) 2 November 16th 06 04:44 PM
VBA Code For OR-Function Using Cell Property kylie Excel Discussion (Misc queries) 1 June 20th 06 02:42 AM
Is there a function to extract the URL part of a hyperlink in another cell? Rufus V. Smith Excel Worksheet Functions 4 March 28th 06 06:39 PM
Edit Hyperlink property Me Excel Discussion (Misc queries) 0 March 4th 05 05:41 PM
Extract hyperlink string from excel cell Ryan Sapien Links and Linking in Excel 1 January 20th 05 12:24 AM


All times are GMT +1. The time now is 12:52 PM.

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

About Us

"It's about Microsoft Excel"