Is there any way to put more than one hyperlink in a single cell?
Is there any way to put more than one hyperlink in a single cell?
If you could, how would it know which one to follow?
Hi Bob,
Actually, this would be ideal. For example, we have a spreadsheet that itemizes process steps by Row. For that same row, the process step is associated with multiple artifacts or hyperlinks, with the full UNC path to the artifact (the full path tells me which link to follow). For metric purposes, even though we have multiple artifacts, it still counts as 1 process step. This probably could be better served in a database, but I find Excel far easier to manipulate.
I have no idea if this can be done, but it would sure be a nice feature have available.
Hi Gary,
I think you're out of luck on this one. I can't think of any way to get mutliple hyperlinks into a single cell.
Ken Puls, CMA, MS MVP (Excel)
Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter
If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.
I would like to run this by you and maybe you can offer some guidance on its implementation.
1. Format the target cell for multiple lines (ALT + ENTER)
2. On each line put a different Path to a file, folder or URL.
Note: These cells would always be formatted this way.
3. Create a Macro (SENDKEYS) to select the specific line (1, 2, 3, 4 or 5) in the Active Cell and copy it to the clipboard or an array, convert the contents of the clipboard or array(value) to a hyperlink and navigate the path.
Last edited by GaryA; 2012-05-02 at 12:08 AM.
Well, I have put multiple paths in a single cell, on separate lines, CHR(10), and can navigate to the individual paths by using Chandoos SplitCell routines and grabbing a target path. See attachment.
However, it is not yet complete. I need to assign keyboard macros to the target paths. For some reason, the Application.OnKey "^1", "Nav_Hyp1" is not working. Any ideas?
Here is the code:
Sub Nav_Hyp1()
On Error Resume Next
Range("MultiLink").Select
'splits Text active cell using ALT+10 char as separator
Dim splitVals As Variant
Dim totalVals As Long
splitVals = Split(ActiveCell.Value, Chr(10))
totalVals = UBound(splitVals)
Hyp1 = splitVals(0)
Hyp2 = splitVals(1)
Hyp3 = splitVals(2)
Hyp4 = splitVals(3)
Hyp5 = splitVals(4)
ActiveWorkbook.FollowHyperlink Address:=Hyp1, NewWindow:=True
Application.OnKey "^1", "Nav_Hyp1"
End Sub
Bookmarks