Category: FUNCTION | Updated: 2026-11-22
How to Use the HYPERLINK Function: Create Hyperlinks with Custom Link Text in a Cell
Overview of the HYPERLINK Function
The HYPERLINK function creates a hyperlink with custom, easy-to-read display text (anchor text) for long URLs or complex destinations. It improves the readability of document directories and URL tables, and can be combined with functions like CONCATENATE or the & operator to generate dynamic search links.
Syntax
=HYPERLINK(url, [link_label])
- url: The destination URL (
"https://...") ormailto:link as a text string. - link_label (optional): The text to display in the cell. If omitted, the URL itself is displayed.
Practical Examples with a Table
This example combines a URL with a title, and dynamically generates a Google search link from a search keyword.
| Cell | A (Target / Keyword) | B (URL) | C (Formula) | D (Displayed Result) |
|---|---|---|---|---|
| 1 | Name | URL | Formula | Cell Display |
| 2 | Official Site | https://example.com | =HYPERLINK(B2, A2) |
Official Site |
| 3 | Google Sheets functions | - | =HYPERLINK("https://www.google.com/search?q=" & A3, "Search " & A3) |
Search Google Sheets functions |
Common Errors and Precautions
- Omitting the protocol (
https://, etc.): Passing only a domain name withouthttps://orhttp://(e.g.,"example.com") may be treated as an invalid link depending on the environment. Always include the protocol. - Missing double quotes around text: When writing a URL or link label directly inside the formula, be sure to enclose it in double quotes (
"..."). Forgetting them causes a#NAME?error. - Restriction on JavaScript links: For security reasons, script-executing links starting with
javascript:do not work.
Frequently Asked Questions
Q. Can HYPERLINK create links to another sheet or a specific cell in the same spreadsheet?
A. Yes. By passing the target cell's URL (in the format #gid=SHEET_ID&range=A1) as the first argument, you can create internal links within the spreadsheet.
Q. Can I create an email link (mailto) with the HYPERLINK function?
A. Yes. Passing a string like "mailto:example@example.com" as the URL creates a link that opens an email compose window when clicked.