Excel - HYPERLINK Function



HYPERLINK Function

The Excel HYPERLINK function generates a link that directs you to a webpage or document on the Internet, an intranet, or a network server. It assists users in saving their precious time and creating crucial links through the Hyperlink function in a worksheet.

Various features of the HYPERLINK function are written below:

  • You can quickly create a hyperlink to navigate among external web resources.
  • You can add the HYPERLINK in Excel, which permits you to jump straightforwardly to the document, residing either on a Hard drive or on a specific website.

Compatibility

This advanced Excel function is compatible with the following versions of MS Excel −

  • Excel for Microsoft 365
  • Excel for Microsoft 365 for Mac
  • Excel for the web
  • Excel 2024
  • Excel 2024 for Mac
  • Excel 2021
  • Excel 2021 for Mac
  • Excel 2019
  • Excel 2016
  • Excel 2013
  • Excel 2010
  • Excel 2007

Syntax

The syntax of the HYPERLINK function is as follows −

=HYPERLINK(link_location, [friendly_name]) 

Arguments

You can use the following arguments with the HYPERLINK function −

Argument Description Required/ Optional
Link_location

It specifies a cell reference that contains a website's address, a valid URL(Uniform Resource Locator) path on the Intranet/Internet, a UNC(Universal Naming Convention) on a server, a path to a specific document on a hard disk, or the complete path location of another worksheet.

Required
Friendly_name

It can be a text string, number, or jump text that populates in blue and underlined.

The jump text or numeric value that is displayed in the cell.

If the Friendly_name is skipped, the targeted cell indicates the link_location as the jump text.

Optional

Points to Remember

  • The HYPERLINK function is a part of the Lookup and Reference function.
  • If friendly_name retrieves an error value like #NULL!, #VALUE!, then the HYPERLINK function will populate the same error.
  • If you omit the "friendly_name", then the HYPERLINK function will take the Link_Location in the form of the friendly_name.
  • If the invalid URL is specified in the "Link_location" argument, then the HYPERLINK function in Excel will not be executed.

Examples of HYPERLINK Function

Practice the following examples to learn the use of the HYPERLINK function in Excel.

Example 1: How to add a HYPERLINK in Excel?

In this example, you may create a hyperlink in Excel to the different cells through the HYPERLINK function, which navigates you to leave the current Excel worksheet and switch to the various locations of the external resources.

Solution

Step 1 − First, place a cursor on the B2 cell and double click on it and write the formula =HYPERLINK("https://www.tutorialspoint.com/how-to-quickly-insert-unique-sequence-numbers-in-excel", "Unique"). In this expression, the first argument specifies the web page URL, and the second argument indicates the friendly name to jump quickly into that external link.

Step 2 − After that, press the Enter tab to add the hyperlink in the Excel worksheet like this.

How to add a HYPERLINK in Excel1

Therefore, once you click on the "Unique" text string, it will open the webpage.

Step 3 − Afterward, select the B3 cell and write the formula =HYPERLINK("D:\Dataset for power bi\Diabetes1.xlsx",F5).

How to add a HYPERLINK in Excel2

Then, press the Enter tab to insert the hyperlink to the reference cell.

How to add a HYPERLINK in Excel3

Therefore, whenever you click on the "Diabetes" text string in the B3 cell, you will be redirected to the path saved on your hard drive.

Example 2

If friendly_name retrieves an error value like #NULL!, #VALUE!, then the HYPERLINK function will populate the error.

Solution

First, write the formula =HYPERLINK("D:\Dataset for power bi\date.xlsx", D4) in the B2 cell. Here, the value of the D4 cell contains an error value.

HYPERLINK Function will Populate Error1

Therefore, the HYPERLINK function will retrieve the #VALUE! error. You may edit the field value of the D4 cell to get the correct result.

HYPERLINK Function will Populate Error2

Download Practice Sheet

You can download and use the sample data sheet to practice the HYPERLINK function.

Advertisements