Please Note: This article is written for users of the following Microsoft Excel versions: 2007 and 2010. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Drop-Down List of Hyperlinks.
Greg knows that he can use data validation to create a drop-down list of choices for a particular cell. (How to do this has been covered in other ExcelTips.) He wonders if it possible to create a drop-down list of hyperlinks and, further, have those hyperlinks remain "hot" when they are selected.
The short answer is no, you can't do that directly. You can, however, make whatever you select in the drop-down list become active. This behavior is a bit kludgy in Excel, however. Follow these general steps:
As you can tell, these steps are a bit awkward, and they become more so if you want to select a different URL from the drop-down list. (You must first right-click and remove the hyperlink and then do the above steps again.)
Perhaps a better solution is to use a workaround that relies on the HYPERLINK function to refer to whatever is selected in the drop-down list. For instance, if you have your data validation drop-down list in cell A1, then you might put the following formula in cell B1:
=HYPERLINK(A1, "Goto Link")
The second parameter in the function is optional; it provides the text you want displayed in the cell. (If you don't provide the second parameter, then the contents of A1 are repeated in B1—something you may not want to see.) When someone picks an option in the drop-down list, the link in cell B1 becomes active and will link to whatever was selected in A1.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11213) applies to Microsoft Excel 2007 and 2010. You can find a version of this tip for the older menu interface of Excel here: Drop-Down List of Hyperlinks.
Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!
Need to get rid of all the hyperlinks in a worksheet? It's easy when you use this single-line macro.
Discover MoreWouldn't it be great if Excel could automatically e-mail you when a due date is reached? It can, if you are using Outlook ...
Discover MoreWhen copying information from the Internet to an Excel workbook, you may want to get rid of graphics but keep any ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2020-03-09 20:18:18
Hello, I have created 10 different hyperlinks in excel and each hyperlink references a word document. I am attempting to create a dropdown list of these hyperlinks so that when I choose the item from the dropdown, I can double click on it and it will go directly to the word document.
When I create the drop down list (using data validation) the drop down list appears but all the items are no longer hyperlinked to the word document originally referenced.
Any help would be greatly appreciated
2017-03-07 13:09:41
Need to add one line of code at the beginning of JaSal's macro. That line is to clear the previous entry in cell "HyperLink_Selected".
His code will now look like:
Sub Whatever you name it()
Call Range("HyperLink_Selected").ClearContents
HyperLink_Index = Range("HyperLink_Selected")
If Range("HyperLinks_Table").Offset(HyperLink_Index - 1, 0).Hyperlinks(1).Name <> "" Then
Range("HyperLinks_Table").Offset(HyperLink_Index - 1, 0).Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
End If
That's not all!
Next
In Format Control
enter the Input Range
enter the Cell Link
enter number of Drop Down lines
Now .. you're good to go
Best
Dick
2016-05-19 10:57:46
JaSal
Well it works, although as already mentioned, visualisation would have been helpful.
Anyway, thanks for the workaround.
The data validation dropdown list is positioned in cell A1 and a
=HYPERLINK(A1;"Goto Link")
in cell A2. The crucial point is to fill the list with the hyperlink_address part of the HYPERLINK-Function.
So the source of the list: in my case an entry looked like this:
[Test.xlsm]Sheet1!A100
This part just replaces the A1 in
=HYPERLINK(A1;"Goto Link")
to form
=Hyperlink([Test.xlsm]Sheet1!A100;"Goto Link")
This only works using the function. If you insert a hyperlink over the menu it won´t work.
Hope that helps.
Good Luck
2016-02-11 20:43:26
anonymous
including screenshots would be more helpful :)
2015-08-13 21:47:38
Neil Raine
The problem can be easily solved with a bit of VBA and using a drop down box. To set up:
1. Create a named range (n rows, 1 column) called "HyperLinks_Table" than contains the list of hyperlinks.
2. Create a named range (1 cell only) called "HyperLink_Selected". Leave this cell blank.
3. Add a ComboBox form control to your spreadsheet. Format the control (right click) to have the following values:
Input Range: HyperLinks_Table
Cell Link: HyperLink_Selected
4. Right click the ComboBox control and select the "Assign Macro" option, click new to create a new macro. Add the following lines to the macro:
HyperLink_Index = Range("HyperLink_Selected")
If Range("HyperLinks_Table").Offset(HyperLink_Index - 1, 0).Hyperlinks(1).Name <> "" Then
Range("HyperLinks_Table").Offset(HyperLink_Index - 1, 0).Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
End If
Now when you change the value in the ComboBox the hyperlink will be opened.
2015-08-13 21:37:55
robert
Mine did not work either !! Please explain..........
2015-06-24 14:54:43
Bob
I tried this but it didn't work. I really need to be able to make a drop down list that will link to elsewhere in the same worksheet. I have 2 drop down lists and both are needed for my purposes. I concatenate the results to another cell so the full text is in one cell, Then I want to have a "go" link that will take the user to the place in the document they just selected with the 2 drop downs. Any help would be appreciated.
2015-01-21 17:59:44
Bill McNamara
I have an Excel 2010 file that has a drop down menu with options in the drop down, to sort a-z and another line to sort z-a. It also has a search field. It also has a list that you can put a check-mark next to, so you can print different criteria from that list. I don't know if I am explaining myself very well. I tried to copy and paste a view of it in this block, but the block will not allow me to do that.
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments