How to Use the HYPERLINK Function in Google Sheets
=HYPERLINK(url, [link_label]). The label is the text shown, and it defaults to the URL.
What HYPERLINK does
HYPERLINK builds a link from a formula, so the address and the label can come from other cells. That is useful for a contact list with one link per row, or a report where the link is assembled from an ID. Per Google, Sheets already converts most valid URLs typed directly into a cell, so the function is not always needed.
HYPERLINK syntax
=HYPERLINK(url, [link_label])
url: the destination, either a quoted full URL or a reference to a cell that holds one. If you leave out the protocol,http://is added automatically. Allowed protocols are http, https, mailto, aim, ftp, gopher, telnet and news. For other protocols the label appears but is not linked.link_label(optional): the text shown in the cell, as a quoted string or a cell reference. It defaults to the URL. An empty string""makes the cell look blank, but it stays clickable.
If the URL evaluates to an error, the function returns an error. Forgetting the quotation marks around the URL or label also causes an error.
A step-by-step example
=HYPERLINK("https://www.google.com", "Google")
This shows the word Google as a clickable link to that address.
Build links from cells
Here a URL is in A2 and its label is in B2.
| A | B | |
|---|---|---|
| 1 | URL | Label |
| 2 | https://example.com | Example site |
=HYPERLINK(A2, B2)
This shows Example site as a link to the address in A2. Fill it down to link every row. To glue a base address and an ID together, use CONCATENATE or the ampersand for the URL.
Common mistakes
- Missing quotation marks around a typed URL or label.
- An unsupported protocol. The label shows but there is no link.
- An empty label cell. The URL is shown instead.
Try it yourself
Use the cells above (A2 and B2). Type your formula into the box, starting with =, then press Check.
Exercise 1: A labeled link
Write a formula that shows the text Google as a link to https://www.google.com.
Exercise 2: Link from cells
Write a formula that makes a link using the URL in A2 and the label in B2.
What to learn next
- JOIN: combine a range into one text with a separator.
- CONCATENATE: join text from several cells.
- TEXTJOIN: combine text from many cells with a separator.
Syntax and rules in this guide were checked against Google's HYPERLINK help page. See all guides.