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 23 July 2004, 01:26 PM
  #1  
markr1963
Scooby Regular
Thread Starter
 
markr1963's Avatar
 
Join Date: Jun 2002
Location: Perth, Western Australia
Posts: 1,866
Likes: 0
Received 0 Likes on 0 Posts
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
Old 23 July 2004, 02:47 PM
  #2  
markr1963
Scooby Regular
Thread Starter
 
markr1963's Avatar
 
Join Date: Jun 2002
Location: Perth, Western Australia
Posts: 1,866
Likes: 0
Received 0 Likes on 0 Posts
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)
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Mattybr5@MB Developments
Full Cars Breaking For Spares
28
28 December 2015 11:07 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
12
18 November 2015 07:03 AM
leg200
Subaru Parts
5
07 October 2015 07:31 AM
has-scooby
Subaru Parts
4
06 October 2015 03:47 PM
bluebullet29
General Technical
9
05 October 2015 02:17 PM



Quick Reply: Excel problem



All times are GMT +1. The time now is 10:18 PM.