Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Excel problem

Thread Tools
 
Search this Thread
 
Old Jul 23, 2004 | 01:26 PM
  #1  
markr1963's Avatar
markr1963
Thread Starter
Scooby Regular
 
Joined: Jun 2002
Posts: 1,866
Likes: 0
From: Perth, Western Australia
Default Excel problem

I have a column of hyperlinks that have different text to display than the address itself. I want to be able to extract the cell ref for each cell that has a hyperlink and the place hyperlink text in the adjacent cell.

Anyone know how to do this?

TIA
Mark
Reply
Old Jul 23, 2004 | 02:47 PM
  #2  
markr1963's Avatar
markr1963
Thread Starter
Scooby Regular
 
Joined: Jun 2002
Posts: 1,866
Likes: 0
From: Perth, Western Australia
Default

Got this from another forum

Create the following custom function in a standard module:

Function HyperlinkAddress(oCell As Range) As String
On Error Resume Next
HyperlinkAddress = oCell.Hyperlinks(1).Address
End Function

(The line On Error Resume Next avoids error values if the cell referred to does not contain a hyperlink.)

Say that A1 contains a hyperlink. Enter the following formula in B1 to see the hyperlink address:

=HyperlinkAddress(A1)

If you store the function in a module in your Personal.xls, use

=Personal.xls!HyperlinkAddress(A1)
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Mattybr5@MB Developments
Full Cars Breaking For Spares
28
Dec 28, 2015 11:07 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
12
Nov 18, 2015 07:03 AM
leg200
Subaru Parts
5
Oct 7, 2015 07:31 AM
has-scooby
Subaru Parts
4
Oct 6, 2015 03:47 PM
bluebullet29
General Technical
9
Oct 5, 2015 02:17 PM




All times are GMT +1. The time now is 10:53 AM.