What is a Hyperlink?
A hyperlink is an object that links to another location in the same file, or to another file altogether. Word processing documents, workbooks, and web pages are all types of files that can contain hyperlinks. When you click on a hyperlink, the associated file or location will open.
The files connected by hyperlinks do not have to be in the same directory, or even on the same computer. In fact, you can have a hyperlink in one file that links to a file thousands of miles away. The World Wide Web makes extensive use of hyperlinks to link web pages together. This is, in fact, where most computer users first become familiar with hyperlinks.
Quite often, hyperlinks come in the form of an underlined word or phrase in a bright blue font. This does not have to be the case, though, as hyperlinks can be a word, a phrase, a symbol, or even a picture! When you click on a hyperlink, an associated URL is used to locate and retrieve the object or file that the hyperlink points to. In the case of the World Wide Web, hyperlinks are used to link and unify web pages that are located on different servers all over the world.
You can create a hyperlink in an Excel workbook that links to an object located in the same directory or on the same computer as the workbook. You can also create a hyperlink that points to a web page, to a file on a remote server, to a location in the same workbook, or to a specific e-mail recipient.
Inserting Hyperlinks
- To start, right-click on the cell that will contain the link, and then click Hyperlink:
- Another way to display the dialog is to first select the cell that will contain your hyperlink, and then choose Insert → Hyperlink:
- Either action will open the Insert Hyperlink dialog:
- Take note of the four buttons running down the left side of the dialog box under the “Link to:” heading. You can use these buttons to create a link to an “Existing File or Web Page,” a “Place in This Document,” “Create New Document,” or to an “E-mail Address.”
- At the top of the dialog, you can see a box named “Text to Display.” The text entered here will appear as a blue underlined hyperlink in the cell that you originally selected. This is what the user will see and click on.
- If you choose the Existing File or Web Page button, you will see a drop list labeled “Look in” just below the “Text to display” field. You can use this list to browse through the various folders on your computer to find the file that you want to create a link to.
- When you select a folder or drive from the drop list, a list of available files or folders corresponding to the selection will appear in the large center area of the dialog box.
- You will also notice three buttons just to the left of the navigation area: Current Folder, Browsed Pages, and Recent Files.
- If you click Current Folder, the drives, files, or subfolders of the current item displayed in the drop list will be displayed. In the preceding image, you can see that “Computer” is entered in the drop box, and the drives on “Computer” are displayed. You can use these navigation tools to navigate and select pretty much any file on your system.
- If you click the “Browsed Pages” button, a list of web pages that you recently visited will be displayed, like this:
- If you click an item in the list to select it, information for the selected item (a URL) will be entered in the “Address” field and in the “Text to display” field (the text that forms the actual hyperlink).
- If you click on the Recent Files button, you will see a list of recently accessed files.
- If you make a selection from an item on one of these lists, the location information (URL or directory path) for the item will be entered in the Address field at the bottom of the dialog box (much like the preceding example for “Browsed Pages”).
- You can also click the ScreenTip button in the upper right of the dialog box to add a brief comment that will appear when the mouse pointer hovers over the hyperlink.
- You can also take the old fashioned route and type a URL for a web page or remote file, or the path to a local file, directly into the “Address” field. In any case, the file or object referred to in the Address field will be the target of the hyperlink.
- Here is an example of a screen tip in action:
- You can also the use the Bookmark button to link to a very specific location (like a cell range) inside another Excel workbook. First, select the Excel file from the list in the large center area, and then click the Bookmark button.
- You will then see the Select Place in Document dialog:
- At this point, you can click to select the specific worksheet that you want to link to and type in a specific cell reference.
- When you have finished making the necessary entries in the dialog box, click OK to return to the Insert Hyperlink dialog. For whatever type of hyperlink you specify, once you have chosen the correct settings, click OK to create your link.
Editing Hyperlinks
To change the displayed text of an existing hyperlink, you can select the cell that contains the link, and then edit the link text in the formula bar:
You can also right-click the hyperlink and click Edit Hyperlink:
This action will display the Edit Hyperlink dialog, which is almost identical to the Insert Hyperlink dialog.
You can now change the target for the hyperlink, the ScreenTip, or the text to display. You can also remove the hyperlink from the worksheet by clicking Remove Link. Once you are ready to commit to your modifications, click OK.Formatting Hyperlink
Hyperlinks will generally appear in bright blue before they have been clicked and purple after they have been clicked. You can change the font color and size for an individual hyperlink by right-clicking it and choosing Format Cells:
This will display the Format Cells dialog box, which you can use to modify the font characteristics, border, shading, and alignment of the link.
The method just described will allow you to format individual hyperlinks; but what about modifying the default color and font size for all hyperlinks?
To start, click the Cell styles button in the Style group on the Home tab. From the options that appear, find the Hyperlink style, right-click it, and choose Modify:
The Style dialog will then open:
Make sure that the word Hyperlink is visible in the “Style name” text box at the top of the dialog. You should also see a check mark next to the word “Font” in the column of checkboxes on the left. This means that the style for hyperlinks currently includes only font settings.
Next, click the Format button in the upper right of the dialog to open the Format Cells dialog.
Here, you can make changes to the appearance of all hyperlinks:
When you are finished modifying the hyperlink style, click OK in the Format Cells dialog.
You will now see the Style dialog again, with checkmarks corresponding to the style changes you made in the Format Cells dialog. If you are finished, click OK in the Style dialog to implement the changes.
Now every new hyperlink you create, along with the existing ones, will have this new style by default.
Using Hyperlink in Excel
The following worksheet contains a hyperlink to a Word document.
You can see that the first link (in cell D19) is now purple, meaning that it has been followed. You should also notice that the linked document has opened in Microsoft Word.
This action will display the Insert Function dialog, from which you can select the Hyperlink function:
You can also specify an image or other graphics as a hyperlink in your spreadsheet. To do this, just click the image and click Insert → Hyperlink: