Lookup & reference function

HYPERLINK function

Creates a clickable link in a cell that opens a web page, file, email or another place in the workbook.

Available in All versions of Excel, including Microsoft 365, Excel for the web and Excel for Mac

In every Excel versionWorks in Google Sheets

Syntax

HYPERLINK(link_location, [friendly_name])
ArgumentWhat it means
link_locationRequiredWhere the link goes, as text: a web address, a file path, a mailto: address, or #Sheet!Cell for a location inside the workbook.
friendly_nameOptionalThe text (or number) to display in the cell. If omitted, the cell shows link_location.

Returns: The friendly_name (or the link location) displayed as a clickable link.

How HYPERLINK works

HYPERLINK builds links with a formula, which means you can create hundreds at once from data already in your sheet: a link to each order in your web shop, to each scanned invoice in a shared folder, or to each customer's email address. Unlike links inserted with Ctrl+K, the destination can change automatically when the cells it is built from change.

The first argument is the destination as text. Web pages start with https://; files can be full paths or network paths; mailto: opens a new email; and a # in front of a sheet and cell (for example #'Summary'!A1) jumps within the same workbook. The second argument is what readers see. Clicking the cell follows the link - to select the cell without following it, click and hold until the pointer changes, or use the arrow keys.

Excel only checks the link when it is clicked. A wrong path shows a "Cannot open the specified file" message rather than an error value in the cell.

Examples

1Link to an online invoice

B2fx=HYPERLINK("https://www.example.com/invoices/" & A2, "Open " & A2)
AB
1InvoiceLink
2INV-1042Open INV-1042

Result: Open INV-1042

The web address is built from the invoice number in A2, and the cell shows a short label. Copy down to create a link for every invoice.

2Jump to another sheet

A1fx=HYPERLINK("#'Summary'!A1", "Back to Summary")
A
1Back to Summary

Result: Back to Summary

The # tells Excel the target is inside this workbook. Quotes around the sheet name are needed when it contains spaces and are harmless otherwise.

3Start an email to a customer

C2fx=HYPERLINK("mailto:" & B2 & "?subject=Your%20invoice", "Email " & A2)
ABC
1CustomerEmailContact
2Maria Lopezmaria@example.comEmail Maria Lopez

Result: Email Maria Lopez

Clicking opens a new message in the default mail program, addressed to B2 with the subject filled in (%20 is an encoded space).

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 15 KB

Common errors and how to fix them

ErrorWhy it happensFix
#VALUE!link_location is longer than 255 characters or the friendly name evaluates to an error.Shorten the address or fix the cells it is built from.
Cannot open the specified fileThe path or URL is wrong, or the file has moved.Check the address; for files use full paths such as \\server\share\file.pdf.

Tips

  • To make the label look like a normal link, Excel formats it automatically; you can still change the font colour.
  • Use ENCODEURL to make search terms with spaces or symbols safe inside a web address.
  • A link to a different workbook can include a target: =HYPERLINK("[Budget.xlsx]Costs!A1", "Budget").

Questions

How do I select a cell that contains a hyperlink without opening it?

Click and hold the mouse button for about a second until the pointer turns into a plus sign, or move to the cell with the arrow keys.

Why does my HYPERLINK say it cannot open the file?

The path is probably wrong or relative. Use a full path, and remember that # is needed for locations inside the same workbook.

Google Sheets

HYPERLINK also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

HYPERLINK in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
CzechHYPERTEXTOVÝ.ODKAZ
FinnishHYPERLINKKI
FrenchLIEN_HYPERTEXTE
HungarianHIPERHIVATKOZÁS
ItalianCOLLEG.IPERTESTUALE
Norwegian (Bokmål)HYPERKOBLING
PolishHIPERŁĄCZE
Portuguese (Brazil)HIPERLINK
Portuguese (Portugal)HIPERLIGAÇÃO
RussianГИПЕРССЫЛКА
SpanishHIPERVINCULO
SwedishHYPERLÄNK
TurkishKÖPRÜ