Create, select, edit, or delete a hyperlink

For quick access to related information in another file or on a Web page, you can insert a hyperlink (hyperlink: A word, phrase, picture, icon, symbol or other element in a computer document or webpage on which a user may click to move to another part of the document or webpage or to open another document, webpage, or file.) in a worksheet cell. You can also insert hyperlinks in specific chart elements.

What do you want to do?


Learn more about hyperlinks

A hyperlink is a link from a document that opens another page or file when you click it. The destination is frequently another Web page, but it can also be a picture, or an e-mail address, or a program. The hyperlink itself can be text or a picture.

When a site user clicks the hyperlink, the destination is shown in a Web browser (Web browser: Software that interprets HTML files, formats them into Web pages, and displays them. A Web browser, such as Windows Internet Explorer, can follow hyperlinks, transfer files, and play sound or video files that are embedded in Web pages.), opened, or run, depending on the type of destination. For example, a hyperlink to a page shows the page in the Web browser, and a hyperlink to an AVI (AVI: A Microsoft Windows multimedia file format for sound and videos that uses the Microsoft Resource Interchange File Format (RIFF) specification.) file opens the file in a media player.

How hyperlinks are used

You can use hyperlinks to do the following:

When you point to text or a picture that contains a hyperlink, the pointer becomes a hand Pointer in the shape of a hand, indicating that the text or picture is something that you can click.

What a URL is and how it works

When you create a hyperlink, its destination is encoded as a Uniform Resource Locator (URL) (Uniform Resource Locator (URL): An address that specifies a protocol (such as HTTP or FTP) and a location of an object, document, World Wide Web page, or other destination on the Internet or an intranet, for example: http://www.microsoft.com/.), such as:

http://example.microsoft.com/news.htm

file://ComputerName/SharedFolder/FileName.htm

A URL contains a protocol (protocol: A method of accessing a document or service over the Internet, such as File Transfer Protocol (FTP) or Hypertext Transfer Protocol (HTTP).), such as HTTP (HTTP: Internet protocol that delivers information on the World Wide Web. Makes it possible for a user with a client program to enter a URL (or click a hyperlink) and retrieve text, graphics, sound, and other digital information from a Web server.), FTP (FTP: A communication protocol that makes it possible for a user to transfer files between remote locations on a network. This protocol also allows users to use FTP commands, such as listing files and folders, to work with files on a remote location.), or FILE, a Web server (Web server: A computer that hosts Web pages and responds to requests from browsers. Also known as an HTTP server, a Web server stores files whose URLs begin with http://.) or network location, and a path and file name. The following illustration defines the parts of the URL:


The four components of a URL

Callout 1 Protocol used (http, ftp, file)
Callout 2 Web server or network location
Callout 3 Path
Callout 4 File name

Absolute and relative hyperlinks

An absolute URL contains a full address, including the protocol (protocol: A method of accessing a document or service over the Internet, such as File Transfer Protocol (FTP) or Hypertext Transfer Protocol (HTTP).), the Web server (Web server: A computer that hosts Web pages and responds to requests from browsers. Also known as an HTTP server, a Web server stores files whose URLs begin with http://.), and the path and file name.

A relative URL has one or more missing parts. The missing information is taken from the page that contains the URL. For example, if the protocol and Web server are missing, the Web browser uses the protocol and domain, such as .com, .org, or .edu, of the current page.

It is common for pages on the Web to use relative URLs that contain only a partial path and file name. If the files are moved to another server, any hyperlinks will continue to work as long as the relative positions of the pages remain unchanged. For example, a hyperlink on the Web page Products.htm points to a page named Apple.htm in a folder named Food; if both pages are moved to a folder named Food on a different server, the URL in the hyperlink will still be correct.

In a Microsoft Excel workbook, unspecified paths to hyperlink destination files are by default relative to the location of the active workbook. You can set a different base address to use by default so that each time that you create a hyperlink to a file in that location, you have to specify only the file name, not the path, in the Insert Hyperlink dialog box.

Top of Page Top of Page

Create a hyperlink to a new file

  1. On a worksheet, click the cell where you want to create a hyperlink.

Tip    You can also select an object, such as a picture or an element in a chart, that you want to use to represent the hyperlink.

  1. On the Insert tab, in the Links group, click Hyperlink.

The Links group on the Insert tab

Tip    You can also right-click the cell or graphic and then click Hyperlink, or you can press CTRL+K.

  1. Under Link to, click Create New Document.
  2. In the Name of new document box, type a name for the new file.

Tip    To specify a location other than the one shown under Full path, you can type the new location preceding the name in the Name of new document box, or you can click Change to select the location that you want and then click OK.

  1. Under When to edit, click Edit the new document later or Edit the new document now to specify when you want to open the new file for editing.
  2. In the Text to display box, type the text that you want to use to represent the hyperlink.
  3. To display helpful information when you rest the pointer on the hyperlink, click ScreenTip, type the text that you want in the ScreenTip text box, and then click OK.

Top of Page Top of Page

Create a hyperlink to an existing file or Web page

  1. On a worksheet, click the cell where you want to create a hyperlink.

Tip    You can also select an object, such as a picture or an element in a chart, that you want to use to represent the hyperlink.

  1. On the Insert tab, in the Links group, click Hyperlink.

The Links group on the Insert tab

Tip     You can also right-click the cell or object and then click Hyperlink, or you can press CTRL+K.

  1. Under Link to, click Existing File or Web Page.
  2. Do one of the following:
    • To select a file, click Current Folder, and then click the file that you want to link to.

Tip    You can change the current folder by selecting a different folder in the Look in list.

  • To select a Web page, click Browsed Pages and then click the Web page that you want to link to.
  • To select a file that you recently used, click Recent Files, and then click the file that you want to link to.
  • To enter the name and location of a known file or Web page that you want to link to, type that information in the Address box.
  • To locate a Web page, click Browse the Web Button image, open the Web page that you want to link to, and then switch back to Excel without closing your browser.
  1. If you want to create a hyperlink to a specific location in the file or on the Web page, click Bookmark, and then double-click the bookmark (bookmark: A location or selection of text in a file that you name for reference purposes. Bookmarks identify a location within your file that you can later refer or link to.) that you want to use.

Note    The file or Web page that you are linking to must have a bookmark.

  1. In the Text to display box, type the text that you want to use to represent the hyperlink.
  2. To display helpful information when you rest the pointer on the hyperlink, click ScreenTip, type the text that you want in the ScreenTip text box, and then click OK.

Top of Page Top of Page

Create a hyperlink to a specific location in a workbook

To link to a location in the current workbook or another workbook, you can either define a name (name: A word or string of characters that represents a cell, range of cells, formula, or constant value. Use easy-to-understand names, such as Products, to refer to hard to understand ranges, such as Sales!C20:C30.) for the destination (destination: General term for the name of the element you go to from a hyperlink.) cells or use a cell reference.

To use a name, you must name the destination cells in the destination workbook.

ShowHow to name a cell or a range of cells

  1. On a worksheet of the source (source file: The file that contains information that was used to create a linked or embedded object. When you update the information in the source file, you can also update the linked object in the destination file.) workbook, click the cell where you want to create a hyperlink.

Tip    You can also select an object, such as a picture or an element in a chart that you want to use to represent the hyperlink.

  1. On the Insert tab, in the Links group, click Hyperlink.

The Links group on the Insert tab

Tip    You can also right-click the cell or object and then click Hyperlink, or you can press CTRL+K.

  1. Under Link to, do one of the following:
  • To link to a location in your current workbook, click Place in This Document.
  • To link to a location in another workbook, click Existing File or Web Page, locate and select the workbook that you want to link to, and then click Bookmark. Do one of the following:
  • In the Or select a place in this document box, under Cell Reference, click the worksheet that you want to link to, type the cell reference in the Type in the cell reference box, and then click OK.
  • In the list under Defined Names, click the name that represents the cells that you want to link to, and then click OK.
  1. In the Text to display box, type the text that you want to use to represent the hyperlink.
  2. To display helpful information when you rest the pointer on the hyperlink, click ScreenTip, type the text that you want in the ScreenTip text box, and then click OK.

Top of Page Top of Page

Create a custom hyperlink by using the HYPERLINK function

You can use the HYPERLINK function to create a hyperlink that opens a document that is stored on a network server, an intranet (intranet: A network within an organization that uses Internet technologies (such as the HTTP or FTP protocol). By using hyperlinks, you can explore objects, documents, pages, and other destinations on the intranet.), or the Internet. When you click the cell that contains the HYPERLINK function, Excel opens the file that is stored at the location of the link.

Syntax

HYPERLINK(link_location,friendly_name)

Link_location    The path and file name to the document to be opened as text. Link_location can refer to a place in a document — such as a specific cell or named range in an Excel worksheet or workbook, or to a bookmark in a Microsoft Word document. The path can be to a file stored on a hard disk drive, or the path can be a universal naming convention (UNC) path on a server (in Excel or a Uniform Resource Locator (URL (Uniform Resource Locator (URL): An address that specifies a protocol (such as HTTP or FTP) and a location of an object, document, World Wide Web page, or other destination on the Internet or an intranet, for example: http://www.microsoft.com/.)) path on the Internet or an intranet.

  • Link_location can be a text string enclosed in quotation marks or a cell that contains the link as a text string.
  • If the jump specified in link_location does not exist or cannot be browsed to, an error appears when you click the cell.

Friendly_name    The jump text or numeric value that is displayed in the cell. Friendly_name is displayed in blue and is underlined. If friendly_name is omitted, the cell displays the link_location as the jump text.

  • Friendly_name can be a value, a text string, a name, or a cell that contains the jump text or value.
  • If friendly_name returns an error value (for example, #VALUE!), the cell displays the error instead of the jump text.

Examples

The following example opens a worksheet named Budget Report.xlsx that is stored on the Internet at the location named example.microsoft.com/report and displays the text "Click for report":

=HYPERLINK("http://example.microsoft.com/report/budget report.xlsx", "Click for report")

The following example creates a hyperlink to cell F10 on the worksheet named Annual in the workbook Budget Report.xlsx, which is stored on the Internet at the location named example.microsoft.com/report. The cell on the worksheet that contains the hyperlink displays the contents of cell D1 as the jump text:

=HYPERLINK("[http://example.microsoft.com/report/budget report.xlsx]Annual!F10", D1)

The following example creates a hyperlink to the range named DeptTotal on the worksheet named First Quarter in the workbook Budget Report.xlsx, which is stored on the Internet at the location named example.microsoft.com/report. The cell on the worksheet that contains the hyperlink displays the text "Click to see First Quarter Department Total":

=HYPERLINK("[http://example.microsoft.com/report/budget report.xlsx]First Quarter!DeptTotal", "Click to see First Quarter Department Total")

To create a hyperlink to a specific location in a Word document, you must use a bookmark to define the location in the document that you want to jump to. The following example creates a hyperlink to the bookmark named QrtlyProfits in the document named Annual Report.docx located at example.microsoft.com:

=HYPERLINK("[http://example.microsoft.com/Annual Report.docx]QrtlyProfits", "Quarterly Profit Report")

In Excel, the following example displays the contents of cell D5 as the jump text in the cell and opens the file named 1stqtr.xlsx, which is stored on in the Statements share on the server named FINANCE. This example uses a UNC path:

=HYPERLINK("\\FINANCE\Statements\1stqtr.xlsx", D5)

The following example opens the file 1stqtr.xlsx in Excel that is stored in a directory named Finance on drive D, and displays the numeric value stored in cell H10:

=HYPERLINK("D:\FINANCE\1stqtr.xlsx", H10)

In Excel, the following example creates a hyperlink to the area named Totals in another (external) workbook, Mybook.xlsx:

=HYPERLINK("[C:\My Documents\Mybook.xlsx]Totals")

In Microsoft Excel for the Macintosh, the following example displays "Click here" in the cell and opens the file named First Quarter that is stored in a folder named Budget Reports on the hard drive named Macintosh HD:

=HYPERLINK("Macintosh HD:Budget Reports:First Quarter", "Click here")

You can create hyperlinks within a worksheet to jump from one cell to another cell. For example, if the active worksheet is the sheet named June in the workbook named Budget, the following formula creates a hyperlink to cell E56. The link text itself is the value in cell E56.

=HYPERLINK("[Budget]June!E56", E56)

To jump to a different sheet in the same workbook, change the name of the sheet in the link. In the previous example, to create a link to cell E56 on the September sheet, change the word "June" to "September."

Top of Page Top of Page

Create or remove a hyperlink to an e-mail address

When you click a hyperlink to an e-mail address, your e-mail program automatically starts and creates an e-mail message with the correct address in the To box, provided that you have an e-mail program installed.

  1. On a worksheet, click the cell where you want to create a hyperlink.

Tip    You can also select an object, such as a picture or an element in a chart, that you want to use to represent the hyperlink.

  1. On the Insert tab, in the Links group, click Hyperlink.

The Links group on the Insert tab

Tip    You can also right-click the cell or object and then click Hyperlink, or you can press CTRL+K.

  1. Under Link to, click E-mail Address.
  2. In the E-mail address box, type the e-mail address that you want to use.
  3. In the Subject box, type the subject of the e-mail message.

Note    Some Web browsers (Web browser: Software that interprets HTML files, formats them into Web pages, and displays them. A Web browser, such as Windows Internet Explorer, can follow hyperlinks, transfer files, and play sound or video files that are embedded in Web pages.) and e-mail programs might not recognize the subject line.

  1. In the Text to display box, type the text that you want to use to represent the hyperlink.
  2. To display helpful information when you rest the pointer on the hyperlink, click ScreenTip, type the text that you want in the ScreenTip text box, and then click OK.

Tip    You can also create a hyperlink to an e-mail address in a cell by typing the address directly in the cell. For example, a hyperlink is created automatically when you type an e-mail address, such as someone@example.com.

Remove a hyperlink to an email address

If email addresses of contacts appear as clickable hyperlinks, you can deactivate them as you would for any other hyperlink.

  1. On a worksheet, click the cell where you want to remove the hyperlink.

Tip    You can also select an object, such as a picture or an element in a chart that you want to use to represent the hyperlink.

  1. Right click, and then select Remove Hyperlink.

Top of Page Top of Page

Create an external reference link to worksheet data on the Web

You can insert one or more external reference (also called links) from a workbook to another workbook that is located on your intranet (intranet: A network within an organization that uses Internet technologies (such as the HTTP or FTP protocol). By using hyperlinks, you can explore objects, documents, pages, and other destinations on the intranet.) or on the Internet. The workbook must not be saved as an HTML (HTML: The standard markup language used for documents on the World Wide Web. HTML uses tags to indicate how Web browsers should display page elements such as text and graphics and how to respond to user actions.) file.

  1. Open the source workbook and select the cell or cell range that you want to copy.
  2. On the Home tab, in the Clipboard group, click Copy.

The Clipboard group on the Home tab

  1. Switch to the worksheet in which you want to place the information, and then click the cell where you want the information to appear.
  2. On the Home tab, in the Clipboard group, click Paste Special.
  3. Click Paste Link. Excel creates an external reference link for the cell or each cell in the cell range.

Note    You may find it more convenient to create an external reference link without opening the workbook on the Web. For each cell in the destination workbook where you want to insert the external reference link, click the cell, and then type an equal sign (=), the URL (Uniform Resource Locator (URL): An address that specifies a protocol (such as HTTP or FTP) and a location of an object, document, World Wide Web page, or other destination on the Internet or an intranet, for example: http://www.microsoft.com/.) address, and the location in the workbook. For example:

='http://www.someones.homepage/[file.xlsx]Sheet1'!A1

='ftp.server.somewhere/file.xlsx'!MyNamedCell

Top of Page Top of Page

Select a hyperlink without activating the link

To select a hyperlink (hyperlink: A word, phrase, picture, icon, symbol or other element in a computer document or webpage on which a user may click to move to another part of the document or webpage or to open another document, webpage, or file.) without activating the link to its destination (destination: General term for the name of the element you go to from a hyperlink.), do one of the following:

  • Click the cell that contains the hyperlink, hold the mouse button until the pointer becomes a cross Excel selection pointer, and then release the mouse button.
  • Use the arrow keys to select the cell that contains the hyperlink.
  • If the hyperlink is represented by a graphic, hold down CTRL, and then click the graphic.

Top of Page Top of Page

Change or format a hyperlink

You can change an existing hyperlink in your workbook by changing its destination (destination: General term for the name of the element you go to from a hyperlink.), its appearance, or the text or graphic that is used to represent it.

Change the destination of a hyperlink

  1. Select the cell or graphic that contains the hyperlink that you want to change.

Tip    To select a cell that contains a hyperlink without going to the hyperlink destination, click the cell and hold the mouse button until the pointer becomes a cross Excel selection pointer, and then release the mouse button. You can also use the arrow keys to select the cell. To select a graphic, hold down CTRL and click the graphic.

  1. On the Insert tab, in the Links group, click Hyperlink.

The Links group on the Insert tab

Tip     You can also right-click the cell or graphic and then click Edit Hyperlink, or you can press CTRL+K.

  1. In the Edit Hyperlink dialog box, make the changes that you want.

Note    If the hyperlink was created by using the HYPERLINK worksheet function, you must edit the formula to change the destination. Select the cell that contains the hyperlink, and then click the formula bar (formula bar: A bar at the top of the Excel window that you use to enter or edit values or formulas in cells or charts. Displays the constant value or formula stored in the active cell.) to edit the formula.

Change the appearance of hyperlink text

You can change the appearance of all hyperlink text in the current workbook by changing the cell style for hyperlinks.

  1. On the Home tab, in the Styles group, click Cell Styles.

The Styles group on the Home tab

  1. Under Data and Model, do the following:
  • To change the appearance of hyperlinks that have not been clicked to go to their destinations, right-click Hyperlink, and then click Modify.
  • To change the appearance of hyperlinks that have been clicked to go to their destinations, right-click Followed Hyperlink, and then click Modify.

Note    The Hyperlink cell style is available only when the workbook contains at least one hyperlink. The Followed Hyperlink cell style is available only when the workbook contains a hyperlink that has been clicked.

  1. In the Style dialog box, click Format.
  2. On the Font tab and Fill tab, select the formatting options that you want, and then click OK.

 Notes 

  • The options that you select in the Format Cells dialog box appear as selected under Style includes in the Style dialog box. You can clear the check boxes for any options that you don't want to apply.
  • Changes that you make to the Hyperlink and Followed Hyperlink cell styles apply to all hyperlinks in the current workbook. You cannot change the appearance of individual hyperlinks.

Change the text or graphic for a hyperlink

  1. Select the cell or graphic that contains the hyperlink that you want to change.

Tip    To select a cell that contains a hyperlink without going to the hyperlink destination, click the cell and hold the mouse button until the pointer becomes a cross Excel selection pointer, and then release the mouse button. You can also use the arrow keys to select the cell. To select a graphic, hold down CTRL and click the graphic.

  1. Do one or more of the following:

Top of Page Top of Page

Copy or move a hyperlink

  1. Right-click the hyperlink (hyperlink: A word, phrase, picture, icon, symbol or other element in a computer document or webpage on which a user may click to move to another part of the document or webpage or to open another document, webpage, or file.) that you want to copy or move, and then click Copy or Cut.
  2. Right-click the cell that you want to copy or move the hyperlink to, and then click Paste.

Top of Page Top of Page

Set the base address for the hyperlinks in a workbook

By default, unspecified paths to hyperlink (hyperlink: A word, phrase, picture, icon, symbol or other element in a computer document or webpage on which a user may click to move to another part of the document or webpage or to open another document, webpage, or file.) destination files are relative to the location of the active workbook. Use the following procedure when you want to set a different default path. Each time that you create a hyperlink to a file in that location, you have to specify only the file name, not the path, in the Insert Hyperlink dialog box.

  1. Click the File tab.
  1. On the Information about <workbook name> page, in the far right pane, click Document Properties, and then click Advanced Properties
  2. Click the Summary tab.
  3. In the Hyperlink base box, type the path that you want to use.

Note    You can override the hyperlink base address by using the full, or absolute, address for the hyperlink in the Insert Hyperlink dialog box.

  1. Click any other tab to return to your file.

Top of Page Top of Page

Delete a hyperlink

To delete a hyperlink, do one of the following:

  • To delete a hyperlink and the text that represents it, right-click the cell that contains the hyperlink, and then click Clear Contents .
  • To delete a hyperlink and the graphic that represents it, hold down CTRL and click the graphic, and then press DELETE.
  • To deactivate a single hyperlink, right-click the hyperlink, and then click Remove Hyperlink. The web address remains in the cell, but it is no longer active nor is it formatted as a hyperlink.

Top of Page Top of Page

Delete multiple hyperlinks

To delete (deactivate) several hyperlinks at once, do the following:

  1. Select a range of cells in which you want to remove hyperlinks. The range of cells can be discontiguous.

Tip    To select a cell that has a hyperlink in it without going to the hyperlink destination, click the cell and hold the mouse button until the pointer becomes a cross Excel selection pointer, and then release the mouse button.

  1. Position the mouse over any cell in the range that is selected, right-click, and then click Remove Hyperlinks.

Top of Page Top of Page

 
 
Applies to:
Excel 2010