ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Is there a function to extract the URL part of a hyperlink in another cell? (https://www.excelbanter.com/excel-worksheet-functions/68831-there-function-extract-url-part-hyperlink-another-cell.html)

Rufus V. Smith

Is there a function to extract the URL part of a hyperlink in another cell?
 
Is there a function to extract the URL part of a hyperlink in another cell?

All I can see is the displayed text for the link.

if I use, for example, =A1 in another cell, all I get is a

copy of the displayed text.

What I am trying to do is automatically create a column of proper urls,
given a list

behind "displayed" urls.

Rufus





Gary''s Student

Is there a function to extract the URL part of a hyperlink in anot
 
Try this tiny UDF:

Function hyp2(r As Range) As String
hyp2 = r.Hyperlinks(1).Address
End Function

--
Gary's Student


"Rufus V. Smith" wrote:

Is there a function to extract the URL part of a hyperlink in another cell?

All I can see is the displayed text for the link.

if I use, for example, =A1 in another cell, all I get is a

copy of the displayed text.

What I am trying to do is automatically create a column of proper urls,
given a list

behind "displayed" urls.

Rufus






Rufus V. Smith

Is there a function to extract the URL part of a hyperlink in anot
 
Fabulous, works perfectly!

Thanks!

Rufus

"Gary''s Student" wrote in message
...
Try this tiny UDF:

Function hyp2(r As Range) As String
hyp2 = r.Hyperlinks(1).Address
End Function

--
Gary's Student


"Rufus V. Smith" wrote:

Is there a function to extract the URL part of a hyperlink in another
cell?

All I can see is the displayed text for the link.

if I use, for example, =A1 in another cell, all I get is a

copy of the displayed text.

What I am trying to do is automatically create a column of proper urls,
given a list

behind "displayed" urls.

Rufus








Jim

Is there a function to extract the URL part of a hyperlink in
 
I have hyperlinks in Excel that link to a cell in another file. Your
function works, but it only gives me the name of the other file.

How do I get the cell name that the hyperlink goes to?

How do I get the worksheet that the hyperlink goes to?

Thanks for your help.

"Gary''s Student" wrote:

Try this tiny UDF:

Function hyp2(r As Range) As String
hyp2 = r.Hyperlinks(1).Address
End Function

--
Gary's Student


"Rufus V. Smith" wrote:

Is there a function to extract the URL part of a hyperlink in another cell?

All I can see is the displayed text for the link.

if I use, for example, =A1 in another cell, all I get is a

copy of the displayed text.

What I am trying to do is automatically create a column of proper urls,
given a list

behind "displayed" urls.

Rufus






Jim

Is there a function to extract the URL part of a hyperlink in
 
I answered my own question... I looked in the object browser under hyperlin,
and found the .address that you used.

Also noticed that there is a .subaddress . I tried this and got both the
worksheet and the cell (i.e. worksheet!cell).

I guess I don't have this question any longer.

Thanks.

Jim

"Jim" wrote:

I have hyperlinks in Excel that link to a cell in another file. Your
function works, but it only gives me the name of the other file.

How do I get the cell name that the hyperlink goes to?

How do I get the worksheet that the hyperlink goes to?

Thanks for your help.

"Gary''s Student" wrote:

Try this tiny UDF:

Function hyp2(r As Range) As String
hyp2 = r.Hyperlinks(1).Address
End Function

--
Gary's Student


"Rufus V. Smith" wrote:

Is there a function to extract the URL part of a hyperlink in another cell?

All I can see is the displayed text for the link.

if I use, for example, =A1 in another cell, all I get is a

copy of the displayed text.

What I am trying to do is automatically create a column of proper urls,
given a list

behind "displayed" urls.

Rufus







All times are GMT +1. The time now is 08:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com