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])| Argument | What it means | |
|---|---|---|
link_location | Required | Where the link goes, as text: a web address, a file path, a mailto: address, or #Sheet!Cell for a location inside the workbook. |
friendly_name | Optional | The 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
| A | B | |
|---|---|---|
| 1 | Invoice | Link |
| 2 | INV-1042 | Open 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
| A | |
|---|---|
| 1 | Back 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
| A | B | C | |
|---|---|---|---|
| 1 | Customer | Contact | |
| 2 | Maria Lopez | [email protected] | Email 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).
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#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 file | The 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.
| Language | Function name |
|---|---|
| Czech | HYPERTEXTOVÝ.ODKAZ |
| Finnish | HYPERLINKKI |
| French | LIEN_HYPERTEXTE |
| Hungarian | HIPERHIVATKOZÁS |
| Italian | COLLEG.IPERTESTUALE |
| Norwegian (Bokmål) | HYPERKOBLING |
| Polish | HIPERŁĄCZE |
| Portuguese (Brazil) | HIPERLINK |
| Portuguese (Portugal) | HIPERLIGAÇÃO |
| Russian | ГИПЕРССЫЛКА |
| Spanish | HIPERVINCULO |
| Swedish | HYPERLÄNK |
| Turkish | KÖPRÜ |