HYPERLINK function

HYPERLINK opens a hyperlink when you click the cell that contains the hyperlink. If you use the optional celltext argument, the formula locates the URL, and then the text or number is displayed.

If you use the optional cellText parameter, the formula locates the URL, and then displays the text or number.

Tip: To open a hyperlinked cell with the keyboard, select the cell and press F2 to enter the Edit mode. Move the cursor in front of the hyperlink, press Shift+F10, and then select Open Hyperlink.

Syntax

HYPERLINK(url,celltext)

  • url specifies the link target.
  • celltext (optional) is the text or a number that is displayed in the cell and is returned as the result. If the celltext argument is not specified, the URL is displayed in the cell text and is returned as the result.

Example

=HYPERLINK("http://www.example.org") shows the text http://www.example.org in the cell and executes the hyperlink http://www.example.org when clicked.

=HYPERLINK("http://www.example.org","Click here") shows the text Click here in the cell and executes the hyperlink http://www.example.org when clicked.

=HYPERLINK("http://www.example.org",12345) shows the number 12345 and opens the hyperlink http://www.example.org when clicked.

=HYPERLINK($B4) where cell B4 contains http://www.example.org. The function adds http://www.example.org to the URL of the hyperlink cell and returns the same text that is used as the formula result.

=HYPERLINK("http://www.","Click") & "example.org" shows the text Click example.org in the cell and opens the hyperlink http://www.example.org when clicked.