+ Reply to Thread
Results 1 to 7 of 7

I need to insert a hyperlink in the middle of a cell that contains text in Excel 2010.

Hybrid View

  1. #1
    Registered User
    Join Date
    11-29-2012
    Location
    N.C.
    MS-Off Ver
    Excel 2010
    Posts
    4

    I need to insert a hyperlink in the middle of a cell that contains text in Excel 2010.

    How can I insert a hyperlink in the middle of text in an Excel cell?

  2. #2
    Registered User
    Join Date
    10-17-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: I need to insert a hyperlink in the middle of a cell that contains text in Excel 2010.

    You would need to do something like the formula below. You also need to make sure that the cell isn't formatted as text.

    ="Your first part of text here "&hyperlink("your link here","what you want the link to display as here")&" the second part of your text here."

  3. #3
    Registered User
    Join Date
    11-29-2012
    Location
    N.C.
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: I need to insert a hyperlink in the middle of a cell that contains text in Excel 2010.

    Quote Originally Posted by snax View Post
    You would need to do something like the formula below. You also need to make sure that the cell isn't formatted as text.

    ="Your first part of text here "&hyperlink("your link here","what you want the link to display as here")&" the second part of your text here."
    I tried that and get the following:

    Cannot open the specified file

  4. #4
    Registered User
    Join Date
    10-17-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: I need to insert a hyperlink in the middle of a cell that contains text in Excel 2010.

    Quote Originally Posted by Tunney View Post
    I tried that and get the following:

    Cannot open the specified file
    Are you setting up the hyperlink correctly? If you hover over the link it should show you the address that the link is going to. If the link is not set up properly then you will continue to receive the error that you got. If you post the link that you want, I can change the formula to have the link in it for you.

  5. #5
    Registered User
    Join Date
    11-29-2012
    Location
    N.C.
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: I need to insert a hyperlink in the middle of a cell that contains text in Excel 2010.

    See my previous reply with file attached at 11:28.

  6. #6
    Registered User
    Join Date
    08-29-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: I need to insert a hyperlink in the middle of a cell that contains text in Excel 2010.

    Suppose you want to insert B3, in B3, I set the text to be "Home Page". I need to insert anchor link like below code:

                sheet.Range["B3"].Text = "Home Page";
                HyperLink link1 = sheet.HyperLinks.Add(sheet.Range["B3"]);
                link1.Type = HyperLinkType.Url;
                link1.TextToDisplay = sheet.Range["B3"].Text;
                link1.Address = @"http://www.excelforum.com";
    It works fine or me by a .NET Excel library(http://www.codeproject.com/Catalogs/3785/Spire-XLS.aspx). You can give it a try.

  7. #7
    Registered User
    Join Date
    11-29-2012
    Location
    N.C.
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: I need to insert a hyperlink in the middle of a cell that contains text in Excel 2010.

    Here is what I see when I attempt the above:
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1