Excel HYPERLINK Function: Syntax, Examples and Tips

Part of the free Module 5: Excel Formulas and Functions · Function 35 of 105 · Full Excel course

The Excel HYPERLINK function creates a clickable link in a cell that opens a web page, a file, an email address or another location in the workbook, and lets you choose the text that is displayed. HYPERLINK in Excel is formula-driven, so links can be built from other cells and updated automatically.

HYPERLINK syntax

=HYPERLINK(link_location, [friendly_name])

Arguments

Argument Required Meaning
link_location Required The destination as text: a URL, a file path, a mailto: address, or a location inside the workbook prefixed with #.
friendly_name Optional The text or number shown in the cell. If omitted, the cell displays link_location itself.

Step-by-step example

=HYPERLINK("https://www.pk-anexcelexpert.com", "PK's Website")
  1. Excel stores the URL as the destination.
  2. The cell displays “PK’s Website” in blue underlined text.
  3. Clicking the cell opens the site in your default browser. To select the cell without following the link, click and hold for a second, or use the arrow keys.

Practical use cases

1. Jump to a cell on another sheet

=HYPERLINK("#'Sales Data'!A1", "Go to Sales Data")

The # prefix means “inside this workbook”. Quote sheet names that contain spaces.

2. Jump to a cell on the same sheet

=HYPERLINK("#B5", "Go to B5")

3. Open a file

=HYPERLINK("C:\Reports\Report.xlsx", "Open Report")

Network paths (\\server\share\file.xlsx) and SharePoint URLs also work.

4. Email link

=HYPERLINK("mailto:info@example.com?subject=Order "&A2, "Email about order "&A2)

5. Dynamic links from a table

=HYPERLINK("https://www.google.com/search?q="&A2, "Search "&A2)

Fill down and every row gets its own search link. The same pattern builds product page links from a SKU column.

6. Dashboard navigation buttons

=HYPERLINK("#"&CELL("address", INDEX(Summary!A:A, MATCH(F2, Summary!A:A, 0))), "View "&F2)

Finds the matching row on another sheet and links straight to it.

Common mistakes and errors

  • #VALUE! – link_location is empty or not text, or a required quote around a sheet name is missing.
  • “Cannot open the specified file” – the path is wrong, the file was moved, or the URL lacks https://. Always include the protocol for web links.
  • Link opens but points to the wrong cell – the # prefix was omitted, so Excel treated the text as a file name.
  • Link text over 255 characters – friendly_name and link_location are each limited to 255 characters. Use a URL shortener or a helper cell.
  • Formatting lost – HYPERLINK cells do not use the Hyperlink cell style automatically. Apply the style manually, or change font colour and underline.

Tips and best practices

  • Store URLs and paths in their own column and build the link with HYPERLINK; you can update hundreds of links by changing one cell.
  • Use the # prefix for in-workbook navigation and combine with CELL(“address”) to jump to a matched row.
  • Add a Back link on every detail sheet (=HYPERLINK(“#Dashboard!A1”, “Back”)) to make dashboards feel like an app.
  • Select without following by clicking and holding, or by arrowing into the cell, when you need to edit the formula.
  • Test links after moving files; relative paths break when the workbook changes folder.

Related functions

  • INDIRECT – builds live references from text, the counterpart to HYPERLINK’s text destinations.
  • CELL – returns the address of a matched cell for in-workbook links.
  • ADDRESS – constructs the reference text.
  • IF – shows a link only when a condition is met.
  • Browse the Excel Formulas hub or watch videos on YouTube.com/@PKAnExcelExpert.

Frequently asked questions

Can I change the colour of a link created with HYPERLINK?

Yes. Select the cell and change the font colour, underline or fill from the Home tab, or apply the built-in Hyperlink cell style. The formula’s behaviour is unaffected.

Can HYPERLINK open a link in a new browser tab?

Excel hands the URL to your default browser, which decides how to open it. Most browsers open it in a new tab; Excel itself has no setting for this.

What happens if the linked file is moved or deleted?

Clicking the cell shows “Cannot open the specified file”. The formula itself does not error, so update link_location whenever files are renamed or relocated.

Need a ready-made template? Browse 7,000+ Excel, Power BI and Google Sheets templates at NextGenTemplates.com.