Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Retrieving hyperlink from cell

I have hyperlinks in a spreadsheet. However, I'd like for a cell to equal
it's hyperlink address. For example, in A1 I have CCNC 2005- Consumer
Commmunications & Networking with the hyperlink address as
http://www.comsoc.org/confs/index/html. I can't see this in the formula bar.
I can only see it through the Edit Hyperlink menu option. I want D1 to equal
http://www.comsoc.org/confs/index/html and have every cell in D to follow
through. Any ideas?

Many Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Retrieving hyperlink from cell

The following UDF will give the Url for an Inserted Hyperlink:

Function hyp(r As Range) As String
hyp = ""
If r.Hyperlinks.Count 0 Then
hyp = r.Hyperlinks(1).Address
Exit Function
End If
If r.HasFormula Then
rf = r.Formula
dq = Chr(34)
If InStr(rf, dq) = 0 Then
Else
hyp = Split(r.Formula, dq)(1)
End If
End If
End Function

so if A1 has a hyperlink then =hyp(A1) will display the url
--
Gary''s Student - gsnu200763


"dezy" wrote:

I have hyperlinks in a spreadsheet. However, I'd like for a cell to equal
it's hyperlink address. For example, in A1 I have CCNC 2005- Consumer
Commmunications & Networking with the hyperlink address as
http://www.comsoc.org/confs/index/html. I can't see this in the formula bar.
I can only see it through the Edit Hyperlink menu option. I want D1 to equal
http://www.comsoc.org/confs/index/html and have every cell in D to follow
through. Any ideas?

Many Thanks!

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
Retrieving Data from Hyperlink within Excel cixelsyd Excel Discussion (Misc queries) 0 November 29th 10 06:11 PM
Retrieving hyperlink from cell dezy Excel Worksheet Functions 0 January 3rd 08 03:52 PM
Retrieving hyperlink from MS Access database אלי Excel Programming 2 October 29th 07 05:59 AM
Retrieving Data: Speed of beating down rows vs retrieving from array? (PeteCresswell) Excel Programming 2 July 9th 07 03:30 PM
Retrieving a value from a cell Paul Lee Excel Programming 2 August 19th 04 06:48 PM


All times are GMT +1. The time now is 09:37 AM.

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"