Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
JB JB is offline
external usenet poster
 
Posts: 115
Default links initiated by cell data

I would like to add a dropdown box (either a combo box or cell validation)
and make it so that each option is connected to a hyperlink. I know how to
create the dropdown, I'm just not sure how to connect the options to
links.....is this possible? Thank you very much for any information you can
provide.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default links initiated by cell data

Start with a table in M1 thru N5:

1 http://www.cnn.com
2 http://www.abc.com
3 http://www.nbc.com
4 http://www.cbs.com
5 http://www.fox.com

In A1 put your data validation dropdown covering the list in column M
In B1 put:

=HYPERLINK(VLOOKUP(A1,M1:N5,2,FALSE))

The VLOOKUP picks the right link and the HYPERLINK function makes the result
"click-able". Enjoy.
--
Gary's Student
gsnu200711

  #3   Report Post  
Posted to microsoft.public.excel.misc
JB JB is offline
external usenet poster
 
Posts: 115
Default links initiated by cell data



"Gary''s Student" wrote:

Start with a table in M1 thru N5:

1 http://www.cnn.com
2 http://www.abc.com
3 http://www.nbc.com
4 http://www.cbs.com
5 http://www.fox.com

In A1 put your data validation dropdown covering the list in column M
In B1 put:

=HYPERLINK(VLOOKUP(A1,M1:N5,2,FALSE))

The VLOOKUP picks the right link and the HYPERLINK function makes the result
"click-able". Enjoy.
--
Gary's Student
gsnu200711

Thank you sooo much!!

Not to be a huge pain, but is there a way for the link that results from the
vlookup function to activate automatically?
(I just figured I'd ask :))
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default links initiated by cell data

Yes it can be done.

We used a Worksheet Change Event Macro. The macro activates when the value
in A1 changes, the macro gets the link from B1 and Activates it. Assuming
that you are not shy about VBA, I will update this post tomorow.
--
Gary''s Student
gsnu200711

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default links initiated by cell data

Keep the original approach, so the link appears in B1. Put the following in
worksheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("A1"), Target) Is Nothing Then
Exit Sub
End If
Dim s As String
s = Range("B1").Value
ActiveWorkbook.FollowHyperlink Address:=s
End Sub

REMEMBER: worksheet code, not a standard module.
--
Gary''s Student
gsnu200711



  #6   Report Post  
Posted to microsoft.public.excel.misc
JB JB is offline
external usenet poster
 
Posts: 115
Default links initiated by cell data

Thank you, but when i put in the code and tested it, it gave me a run-time
error '5': Invalid procedure or argument :( (any suggestions?)

"Gary''s Student" wrote:

Keep the original approach, so the link appears in B1. Put the following in
worksheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("A1"), Target) Is Nothing Then
Exit Sub
End If
Dim s As String
s = Range("B1").Value
ActiveWorkbook.FollowHyperlink Address:=s
End Sub

REMEMBER: worksheet code, not a standard module.
--
Gary''s Student
gsnu200711

  #7   Report Post  
Posted to microsoft.public.excel.misc
JB JB is offline
external usenet poster
 
Posts: 115
Default links initiated by cell data

FYI - when I select debug it highlights: ActiveWorkbook.FollowHyperlink
Address:=s

"Gary''s Student" wrote:

Keep the original approach, so the link appears in B1. Put the following in
worksheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("A1"), Target) Is Nothing Then
Exit Sub
End If
Dim s As String
s = Range("B1").Value
ActiveWorkbook.FollowHyperlink Address:=s
End Sub

REMEMBER: worksheet code, not a standard module.
--
Gary''s Student
gsnu200711

  #8   Report Post  
Posted to microsoft.public.excel.misc
JB JB is offline
external usenet poster
 
Posts: 115
Default links initiated by cell data

Nevermind! I made an error on the target cell, I just fixed it and now it
works perfectly!!!! YOU ARE AWESOME!!!

"Gary''s Student" wrote:

Keep the original approach, so the link appears in B1. Put the following in
worksheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("A1"), Target) Is Nothing Then
Exit Sub
End If
Dim s As String
s = Range("B1").Value
ActiveWorkbook.FollowHyperlink Address:=s
End Sub

REMEMBER: worksheet code, not a standard module.
--
Gary''s Student
gsnu200711

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default links initiated by cell data

You are welcome ! I think hyperlinks are under-utilized. As you can see,
they are great for automating tasks.
--
Gary's Student
gsnu200712


"JB" wrote:

Nevermind! I made an error on the target cell, I just fixed it and now it
works perfectly!!!! YOU ARE AWESOME!!!

"Gary''s Student" wrote:

Keep the original approach, so the link appears in B1. Put the following in
worksheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("A1"), Target) Is Nothing Then
Exit Sub
End If
Dim s As String
s = Range("B1").Value
ActiveWorkbook.FollowHyperlink Address:=s
End Sub

REMEMBER: worksheet code, not a standard module.
--
Gary''s Student
gsnu200711

  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 84
Default links initiated by cell data

This is very similar to something I want to do, and I'm hoping you help me too!

I want to use Data Validation, with a list, but I want the actual value to
be "hyperlinked" without the actual link showing.

So, I'd want the list of networks to appear in the drop-down list (CNN, ABC,
NBC, etc.) then when the user selects one of them, the name is what is in the
cell, but it's got a hyperlink associated with it. So they can then click
right on the cell where the drop down was.

Thanks!!


  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 93
Default links initiated by cell data

Hi Gary, not the OP here but I tried this solution for navigating through
multiple worksheets in a workbook. Idea was to have a Frozen Pane on top
with drop-down navigation of workbook, and I had the text display for all the
hyperlinks read 'Go'.

The N Column Hyperlinks work fine, however when I use them in B they say
'Can't Find Specified File'. Do I need some 'absolute' reference?

FYI the Hyperlinks are to named ranges not specific cells, I can't see how
that would matter though...

"Gary''s Student" wrote:

Start with a table in M1 thru N5:

1 http://www.cnn.com
2 http://www.abc.com
3 http://www.nbc.com
4 http://www.cbs.com
5 http://www.fox.com

In A1 put your data validation dropdown covering the list in column M
In B1 put:

=HYPERLINK(VLOOKUP(A1,M1:N5,2,FALSE))

The VLOOKUP picks the right link and the HYPERLINK function makes the result
"click-able". Enjoy.
--
Gary's Student
gsnu200711

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
Links to other data sources Lauren Giles Excel Discussion (Misc queries) 4 March 20th 07 11:16 PM
Links to other data sources mr_teacher Excel Discussion (Misc queries) 2 May 16th 06 02:30 PM
Links to other data sources Graham Haughs Excel Discussion (Misc queries) 2 February 25th 06 01:55 PM
using links to show data PHedges Excel Worksheet Functions 0 March 15th 05 03:37 PM
I want a window to cell data that conains links to PDF files and . WEATHER TECH. NOT A ROCKET ENGINEER Excel Discussion (Misc queries) 1 February 24th 05 08:21 PM


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