Results 1 to 10 of 23

Thread: Multiple hyperlinks in a single cell

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Multiple hyperlinks in a single cell

    Is there any way to put more than one hyperlink in a single cell?

  2. #2
    Super Moderator Bob Phillips's Avatar
    Join Date
    Mar 2011
    Posts
    1,854
    Articles
    0
    Excel Version
    O365
    If you could, how would it know which one to follow?

  3. #3
    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.

  4. #4
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,452
    Articles
    44
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    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, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    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.

  5. #5
    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.

  6. #6
    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
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •