hyper-link from other worksheet

Skip to first unread message

Darren Douglas (Sprint)

Mar 5, 2003, 9:01:34 AM3/5/03
I have a file with two pages. Page 2 has a hyper-link in
a cell. Page 1 has a formula in a cell that is to pull
the hyper-link to its self from Page 2. The characters
copy over, but not as a hyper-link.
Can you help?


Mar 5, 2003, 9:34:13 AM3/5/03
Are you using the HYPERLINK funtion in the formula? If you
use HYPERLINK() and reference the cell in the other
worksheet between the brackets it should work.

Darren Douglas

Mar 5, 2003, 10:06:02 AM3/5/03
Would you provide me with an example. I did not get it to
work. I want to be able to click on the hyperlink on

Assume that Page1 has the formula
and Page2 has the link that is to be pull over to Page1
(http://netblue.red.com/BackUp Listing.htm)


Mar 5, 2003, 10:39:01 AM3/5/03
Maybe I'm misunderstanding your original question. Here's
what I've done.

Worksheet 1 is called Control
Worksheet 2 is called Data

In the Data sheet at cell A1 is the actual hyperlink.

In the Control sheet at cell A1 is the formula =HYPERLINK

This brings back the hyperlink address from the Data sheet
and is active.

Sorry for any confusion

Dave Peterson

Mar 5, 2003, 5:37:59 PM3/5/03
So you don't want a hyperlink to go to another sheet, you want to refer to
another cell and use that cell's hyperlink?

If yes, then I think you'll need a UserDefinedFunction:

Option Explicit
Function getHyperlink(rng As Range) As String

getHyperlink = ""
If rng(1).Hyperlinks.Count > 0 Then
getHyperlink = rng(1).Hyperlinks(1).Address
End If

End Function

Then I could use this formula in another cell:

(Note that this returns the hyperlink address if the hyperlink were added via
Insert|Hyperlink (ctrl-k). It won't return the address if the hyperlink was the
result of the =hyperlink() function.)

If you're new to macros, you can read more about them at David McRitchie's site:

Short course:
Hit alt-f11 to get to the VBE (where macros/UDF's live)
hit ctrl-R to view the project explorer
Find your workbook.
should look like: VBAProject (myworkbookname.xls)
right click on it
Insert, then Module
You should see the code window pop up on the right hand side

Paste the code in there.

Close this window.

Test it out.


Dave Peterson

Reply all
Reply to author
0 new messages