HYPERLINK

  • Thread starter Thread starter bgkgmg
  • Start date Start date
Great question!

Say we have in C1 thru C6:

cnn
abc
cbs
fox
nbc
bbc

and a data validation pull-down in B1. In A1 enter:
=HYPERLINK("http://www." & B1 & ".com")

So basically the hyperlink is defined by what you pull down.
 
Is the selection already a URL, or do you have a URL to match the value in
the drop down list?
 
Here's some sample code if the drop down selection includes the URL. Right
click on the worksheet with the drop down and View Source. Paste this in the
window that's displayed.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim myRange As Range
Set myRange = Me.Range("D2") 'Change as needed for cell with dropdown
If Not Intersect(Target, myRange) Is Nothing Then
myRange.Hyperlinks.Add Anchor:=Target, Address:=Target.text,
TextToDisplay:=Target.text
End If
End Sub
 
Hi Gary's Student, Great answer too, however for some reason after I do all
the steps then when clicking in the selected hyperlink ( either A1 or B1) it
does not
go to the website or anything else. I've been looking for this topic all
over, please
give it a try and let me know what I'm doing wrong. Thanks, Apreciate it.
 
You sure want to know what it was. After keep trying all websites in the
Dropdown list, some of them worked, some did not. I realized that when I
named them some had 'spaces' ( microsoft group, school menu,etc.) between
words others not(wikipedia, nbcnews,etc.) Guess which ones worked.
GOOD GUESS! No spaces please. Thanks for the follow up Gary's Student.
Really Apreciate it.
 
Back to zero.
Some websites when clicking A1 after doing dropdown tells me ''unable to
open can not locate the internet service/proxy provider.
When clicking the same website in the master list ( source of the dropdown
list), then it opens the website. What is wrong now.
Thanks.
 
The links are within the same workbook. I have tried to enter values within
your parenthesis but not having much luck. Is there a generic formula to use
for hyperlinks within the workbook?

Thanks
Bobby
 
Im not sure what URL is but if it means the same workbook then yes. I have
pasted in your response and I probably did not change somthing where I should
have. Could you post again and perhaps underline what I am to add.

Thanks
Bobby
 
Suppose you have a list of names in A1:A12 of Sheet2, and in A1 of
Sheet1 you have a drop-down to enable you to select from that list of
names. Put this formula in B1 of Sheet1:

=HYPERLINK("#Sheet2!A"&MATCH(A1,Sheet2!A1:A12,0),"Click to jump
there")

It will display "Click to jump there" in the cell and if you you click
on B1 the cursor will jump to the cell in Sheet2 which matches the
name you have chosen in A1 of Sheet1 - is this what you want?

Hope this helps.

Pete
 
Your example helped me understand how to right the formula that fits what I
wanted.
Thanks very much
 
Back
Top