Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Jun 2001
    Location
    USA
    Posts
    708
    Thanks
    48
    Thanked 1 Time in 1 Post

    Multiple links in same cell & half-linked cells (XP)

    Hi,

    Regarding the attached spreadsheet, does anyone know how to accomplish the following?

    In B5, I want to separately hyperlink the two e-mail addresses.

    In B7, I want to hyperlink the e-mail address but not the phone number.

    Many thanks.

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Multiple links in same cell & half-linked cells (XP)

    Excel's (unlike word) hyperlinks are part the cell itself so you can only have 1 hyperlink to a cell. In workd you could create multiple hyperlinks in a table like this directly.

    A possible workaround in excel in not using a link, but an object linked to to a macro:
    Format each separate object as desired to look like a hyperlink
    Add a textbox (for example, it does not matter what object you choose, you are going to make it not visible anyway)
    Make it the size of the text you want to link and Remove the "text box" text
    Create a macro that opens the desired file (you can even use the followhyperlink method):

    <pre>ActiveWorkbook.FollowHyperlink _
    Address:="http://www.LinkHere.com", _
    NewWindow:=True</pre>


    The assign the macro to the object. Create as many macros as desired to go to where you want.

    If you want 2 links in a cell add 2 objects. If you only want part of it linked only format that part (the formatting does nothing other than "indicate" the link visually) When you move over the object, with the assigned macro the cursor will change to finger.

    Steve

  3. #3
    5 Star Lounger
    Join Date
    Jun 2001
    Location
    USA
    Posts
    708
    Thanks
    48
    Thanked 1 Time in 1 Post

    Re: Multiple links in same cell & half-linked cells (XP)

    Hi Steve,

    I apologize for not replying sooner. Unfortunately, I am no closer to a solution

    In short, I can't figure out how to act on your instructions. I don't know what you mean by "format each separate object"; I don't know how to "remove the "text box" text; I don't know how to assign the macro to the object.

    Any chance you could show me in B5 and/or B7 (on the new, attached spreadsheet)? I'm a visual learner.

    I very much appreciate your help.

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Multiple links in same cell & half-linked cells (XP)

    Create the 3 macros. Change names as desired:
    <pre>Sub EmailMe1()
    ActiveWorkbook.FollowHyperlink _
    Address:="mailtoDUDAJEK@utica.gannett.com", _
    NewWindow:=True
    End Sub</pre>


    <pre>Sub EmailMe2()
    ActiveWorkbook.FollowHyperlink _
    Address:="mailto:BDICOCCO@utica.gannett.com", _
    NewWindow:=True
    End Sub</pre>


    <pre>Sub EmailMe3()
    ActiveWorkbook.FollowHyperlink _
    Address:="mailtoped@nytimes.com", _
    NewWindow:=True
    End Sub</pre>


    Now setup:
    Select B5
    Select the first email address(DDUDAJEK@utica.gannett.com)
    Format Cells
    Underline: Single
    Color: Select Blue
    <ok>
    Select the 2nd email address(BDICOCCO@utica.gannett.com)
    Format Cells
    Underline: Single
    Color: Select Blue
    <ok><enter>

    Now B5 "looks" like it has 2 hyperlinks (they are just formattted to look that way however)

    From the FORMS toolbar select a "label" [Aa] and place it one in the cell over the first email address and make it the same approximate size. Highlight the "Label 1" text and delete it.
    Right-click the border, it should be highlighted, select "assign macro" and choose "EmailMe1"

    Do the same (add label and assign macro) for the 2nd address only assign EmailMe2.

    Now B5 looks like it has 2 hyperlinks, when you go over the text you get the "pointy finger" and the macro will run.

    For B7 work similarly. Highlight the text the want to appear as a link, format it. Add a label, delete the text, assign the macro (EmailMe3).

    It is not perfect, but it is a workaround.

    Steve

  5. #5
    5 Star Lounger
    Join Date
    Jun 2001
    Location
    USA
    Posts
    708
    Thanks
    48
    Thanked 1 Time in 1 Post

    Re: Multiple links in same cell & half-linked cells (XP)

    Many thanks Steve!

Posting Permissions

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