HYPERLINK Formula – Clickable Link – Excel, VBA, & G Sheets

Download Example Workbook

Download the example workbook

This Tutorial demonstrates how to use the Excel HYPERLINK Function in Excel to create a clickable link.

HYPERLINK Main Function

HYPERLINK Function Overview

The HYPERLINK Function Creates a clickable link. The link may refer to a webpage, external document, or a cell within the active workbook.

To use the HYPERLINK  Excel Worksheet Function, select a cell and type:

hyperlink formula syntax

(Notice how the formula inputs appear)

HYPERLINK Function Syntax and Inputs:

=HYPERLINK(link_location,friendly_name)

link_location – The file path, web address, or link address. Example: “www.excelbootcamp.com”

friendly_name – The link name to display. Example: Excel Boot Camp

HYPERLINK Function 

The HYPERLINK Function creates a clickable shortcut which redirects users from one location to another. The location can be a cell/sheet in a workbook, another workbook, email address, file on the internet or a network server.

Once the hyperlink is created, the clickable shortcut or [friendly_name] is the text that displays instead of the entire URL.

HYPERLINK Function – Cell Reference

The HYPERLINK Function can jump to a cell reference within the same workbook.

=HYPERLINK("#T6", "Go to Cell T6")

HYPERLINK 01

HYPERLINK Function – Sheet Reference

Similarly the HYPERLINK Function can also jump to a sheet reference within the same workbook.

=HYPERLINK("#'example3'!A1","Jump to Sheet example3")

HYPERLINK 02

HYPERLINK Function – File Location

Absolute Path

The HYPERLINK Function can open a different workbook or any file present on your system.

=HYPERLINK("X:\Book2.xlsx","Open Book2")

HYPERLINK 03

Note: the hyperlink will not work if you change file location

Relative Path

In case the file location is expected to change, we can use a relative path in the HYPERLINK Function.

=HYPERLINK("Excel files\Book3.xlsx","Open Book3")

HYPERLINK 07

HYPERLINK Function – Email Address

The HYPERLINK Function can send a message to a specific recipient.

=HYPERLINK("mailto:example@gmail.com","Drop us an email")

HYPERLINK 04

HYPERLINK Function – Webpage

The HYPERLINK Function can redirect users to a specific webpage.

=HYPERLINK("https://learn.autovbax.com/","Learing VBA")

HYPERLINK 05

HYPERLINK, INDEX & MATCH Function

The HYPERLINK Function can be used with INDEX & MATCH Function to create hyperlinks that pull a matching value & create a shortcut to it.

=HYPERLINK("#"&CELL("address", INDEX(A2:A6, MATCH(D2, B2:B6,0))), INDEX(A2:A6, MATCH(D2, B2:B6,0)))

HYPERLINK 06

 

Multiple HYPERLINKS

When using the HYPERLINK Function, multiple hyperlinks can be edited at the same time. Open the Find & Replace dialogue by pressing Ctrl+H.

  1. In the dialogue, enter the old link in Find what: box & new link in the Replace with: box. 
  2. Click the Look in: dropdown and select Formulas.
  3. Now click Replace All button

HYPERLINK 08

 HYPERLINK in Google Sheets

The HYPERLINK Function works exactly the same in Google Sheets as in Excel:

HYPERLINK Google Function

Additional Notes

Use the HYPERLINK Function to create a hyperlink to a cell within the workbook, an external file, or a webpage. Clicking the link will “goto” to reference. Depending on the type of hyperlink, this may open a web browser, another file, or simply jump to the referenced cell in the activate workbook.

To select a cell containing a hyperlink, without opening it, select the cell using the arrow keys.

If you use the hyperlinks that open webpages in Excel you may want to change the text that identifies the link(called Anchor text in webspeak).

Usually you can just type a URL in a cell and it automatically converts to a Hyperlink. This works fine for linking to Domains, however when I link to individual pages the link looks long and ugly. Fortunately Excel provides a way to choose the text that displays. Excel calls it friendly_name.

To control the text that displays for a Hyperlinked cell, enter your link as follows:

Syntax

=HYPERLINK(link_location,[friendly_name])

Example

=HYPERLINK(“https://www.autovbax.com”,”Automate AutoVBA Home Page”)