Need hyperlink function to obtain range name from a cell (contents

D

DW

Hi:
I want to set up a hyperlink to a named range. I have to set up about 2000
hyperlinks and I need to have the hyperlink obtain the range name from a cell
in the same worksheet. For example I will have range names entered into
cells B1:B5. I want to set up hyperlinks in cells C1:C5 that go to column B,
in the same row, pick up the range name and then send the user to the range
based on that name.

I would be grateful for any help I can obtain.

Thanks
DW
 
R

Ron Coderre

With your posted example

Try this:

B1: (a range name....eg MyRange1)
B2: (a range name....eg MyRange2)
etc

C1: =HYPERLINK("#"&B1,"Go to: "&B1)
Copy C2 down through C5

Is that something you can work with?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)
 
G

Gary''s Student

This macro will set up hyperlinks from C1 thru C5 as per your example:

Sub hyperset()
Set r = Range("B1:B5")
For Each rr In r
ActiveSheet.Hyperlinks.Add Anchor:=rr.Offset(0, 1), Address:="", _
SubAddress:=rr.Value, TextToDisplay:=rr.Value
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top