MS-Excel / Excel 2003

Adding Hyperlinks to a Worksheet

To add hyperlinks to your Excel worksheet, you must define two things:

  • The object to which the link is anchored and which you must click to activate.
  • The destination where the link takes you when you activate it

You can attach hyperlinks to any text entry you make in a worksheet cell or to any graphic object that you draw or import into the worksheet. The destinations that you can specify for your hyperlinks can be inside the workbook or outside of it (including another Excel workbook or other type of document, Web page, or even an e-mail address).

The destinations inside the workbook with the links can include

  • Cell reference of a cell in any of the worksheets in the workbook.
  • Range name of the group of cells that you want to select when you click the hyperlink. (The range name must already exist at the time you create the link.)

The destinations outside the workbook with the links can include

  • Filename of an existing file that you want to open when you click the hyperlink. This file can be another workbook file or any other type of document that your computer can open.
  • URL of a Web page that you want to visit when you click the link. This page can be on your company's intranet or on the World Wide Web and is opened in your Web browser.
  • New document that you want to create in Excel or some other program on your computer when you click the hyperlink. You must specify the filename and file extension, which indicates what type of document to create and what program to launch.
  • E-mail address for a new message that you want to create in your e-mail program when you click the hyperlink. You must specify the recipient's e-mail address and the subject of the new message when creating the link.

The steps for creating a new hyperlink in the worksheet are very straightforward. The only thing you need to do beforehand is either to add the text entry to the cell to which you want to anchor the link or to draw or import the graphic object to attach the link to. Then to add a hyperlink to the text in this cell or the graphic, follow these steps:

  1. Position the cell pointer in the cell containing the text or click the graphic object to which you want to anchor the hyperlink.
  2. Choose Insert → Hyperlink and click the Insert Hyperlink button. Or press Ctrl+K to open the Insert Hyperlink dialog box.
    If you selected a graphic object or a cell that contains some entry besides text before opening this dialog box, you notice that the Text to Display text box contains <<Selection in Document>> and that this box is grayed out (because there isn't any text to edit when anchoring a link to a graphic). If you selected a cell with a text entry, that entry appears in the Text to Display text box. You can edit the text in this box; however, be aware that any change you make to the text here is also made to the entry in the current cell as soon as you close the Insert Hyperlink dialog box.
  3. Click the ScreenTip button located to the immediate right of the Text to Display text box and then type the text that you want to appear next to the mouse pointer in the Set Hyperlink ScreenTip dialog box. Then click its OK button to return to the Insert Hyperlink dialog box.
    A ScreenTip is text describing the function of the link when you position the mouse pointer over the cell or graphic object to which the link is attached. Note that if you don't add your own ScreenTip, Excel automatically creates its own ScreenTip that lists the destination of the new link when you position the mouse pointer on its anchor.
  4. Select the type of destination for the new link by clicking its button in the Link To panel. Your choices are:
    • Existing File or Web Page: Assign the link destination to a file on your hard drive or to a Web page. This option is the default.
    • Place in This Document: Link to a cell or cell range in the current workbook.
    • Create New Document: Link to a new document.
    • E-Mail Address: Link to a new e-mail message.
  5. Specify the destination for the new hyperlink by using the text boxes and drop-down lists that appear for the type of link destination that you selected.
    How you specify this destination depends upon which type of link you're adding; see the following instructions for details.
    • Existing File or Web: To link to an existing file, open its folder in the Look In drop-down list and then select its file icon in the list box. If you're linking to a Web page, enter the URL (as in http:// and so on) in the Address text box. If the file or Web page that you select contains bookmarks (or range names in the case of another Excel workbook) that name specific locations in the file to which you link, click the Bookmark button, select the name of the location (bookmark) in the Select Place in Document dialog box, and click OK.
    • Place in This Document: To link to a cell address or name range in the current workbook, enter the address of the cell to link to in the Type the Cell Reference text box. Select the name of the sheet that contains this cell. The sheet name may be listed under the Cell Reference range or the Defined Names heading that appears in the Or Select a Place in This Document list box.
    • Create New Document: To create a new document to link to, enter a filename for the new document in the Name of New Document text box. Include the three-letter filename extension if this new document is not an Excel workbook - .doc to create a new Word document, for example, or .txt to create a new text file. To specify a different folder in which to create the new document, click the Change button to the right of the current path and then select the appropriate drive and folder in the Create New Document dialog box. If you want to edit the contents of the new document right away, leave the Edit the New Document Now option selected. If you prefer to edit the new document at a later time, select the Edit the New Document Later option instead.
    • E-Mail Address: To create a new e-mail message in your e-mail program when the hyperlink is clicked, enter the e-mail address in the E-Mail Address text box and then enter the subject of the new e-mail message in the Subject text box.
  6. Click OK.

Excel closes the Insert Hyperlink dialog box and returns you to the worksheet with the new link (unless you specified that the new link is to create a new document and you left the Edit New Document Now option selected, in which case, you're in a new document, possibly in another application program such as Microsoft Word). If you anchored your new hyperlink to a graphic object, that object is still selected in the worksheet. (To deselect the object, click a cell outside of its boundaries.) If you anchored your hyperlink to text in the current cell, the text now appears in blue and is underlined. (You may not be able to see the underlining until you move the cell pointer out of the cell.)

Whenever you position the mouse pointer over the cell or the graphic object with the hyperlink, the mouse pointer changes from the thick, white cross pointer to a hand with the index finger pointing up, and the ScreenTip that you assigned appears below and to the right of the hand.

If you didn't assign a custom ScreenTip to the hyperlink, Excel displays a text box containing the URL or pathname of the link's destination. If the link is a hypertext link (that is, if it's anchored to a cell containing a text entry), the program appends the following message to the end to the URL or pathname that's listed:

Click once to follow. Click and hold to select this cell.

For example a table of contents worksheet that contains a bunch of hyperlinks to the various sheets and charts in the workbook. As you can see, when I position the hand mouse pointer on the hypertext of the first of the many links, Excel displays the long pathname to the cell A1 on the Total Income worksheet, followed by the message about clicking once to follow the link and clicking and holding to select its cell instead.

You can also assign a hyperlink to a spreadsheet cell or graphic object by right-clicking on it and then selecting Hyperlink on the shortcut menu. Excel opens the Insert Hyperlink dialog box where you define the destination and ScreenTip for the new link as described earlier in this section.

[Contents] [Next]