Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How to extract a web address from a hyperlink cell?

I hava column of data that shows "friendly" website names. I want to extract
the actual website URLs that are embedded in the data. Anyone know how?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default How to extract a web address from a hyperlink cell?

Use this tiny UDF:

Function hyp(r As Range) As String
Dim s As String

If r.HasFormula Then
s = r.Formula
s_array = Split(s, Chr(34))
hyp = s_array(1)
Else
hyp = r.Hyperlinks(1).Address
End If
End Function


for example =hyp(A1)

This will work if either the hyperlink was inserted directly or via the
=HYPERLINK() function.
--
Gary's Student


"El Rebelde" wrote:

I hava column of data that shows "friendly" website names. I want to extract
the actual website URLs that are embedded in the data. Anyone know how?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How to extract a web address from a hyperlink cell?

Thanks GS; that worked perfectly.

"Gary''s Student" wrote:

Use this tiny UDF:

Function hyp(r As Range) As String
Dim s As String

If r.HasFormula Then
s = r.Formula
s_array = Split(s, Chr(34))
hyp = s_array(1)
Else
hyp = r.Hyperlinks(1).Address
End If
End Function


for example =hyp(A1)

This will work if either the hyperlink was inserted directly or via the
=HYPERLINK() function.
--
Gary's Student


"El Rebelde" wrote:

I hava column of data that shows "friendly" website names. I want to extract
the actual website URLs that are embedded in the data. Anyone know how?

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
Address of Maximum value in Cell Session101 Excel Worksheet Functions 1 April 12th 06 09:06 PM
Replace a spreadsheets named cells/ranges with exact cell address. David McRitchie Excel Discussion (Misc queries) 0 September 28th 05 08:59 PM
Excel email address hyperlink does not update Michael Excel Discussion (Misc queries) 1 August 2nd 05 02:36 PM
Concatenating a cell address nebb Excel Worksheet Functions 3 July 16th 05 10:38 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM


All times are GMT +1. The time now is 01:34 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"