HYPERLINK function

HYPERLINK returns a clickable text string that opens a web page, file, or email address when the user selects it in a spreadsheet.

=HYPERLINK(link_location, [friendly_name])

Generate a HYPERLINK formula

Describe what you need. The generator will reach for HYPERLINK where HYPERLINK is the right tool, and tell you when it is not.

How to get a better answer
  • Name your columns by letter and by header: "column F (Net Value)" beats "the amount column".
  • State every condition, including the negatives — "not cancelled" changes the formula's shape.
  • Say where the data starts if it is not row 1, and whether it will grow.
  • Check the settings above match your spreadsheet: the wrong argument separator is a syntax error on your machine.

Arguments

How HYPERLINK reads its arguments
link_locationrequiredfriendly_nameoptionalHYPERLINK
ArgumentRequiredDescription
link_locationRequiredA text string (or reference to a cell containing text) that specifies the target URL, file path, or mailto address; if blank or not a valid hyperlink, an error is produced.
friendly_nameOptionalOptional text to display instead of the raw URL; if omitted, the function shows the link_location itself as the clickable label.

Returns

It returns a single-cell text value that displays either the friendly name or the URL itself.

Availability

Excel: All · Google Sheets: Supported

Worked examples

1. Create a customer-specific invoice link

CustomerPlanMRRSignup DateChurn Date
Acme CorpPro12002023-01-15
=HYPERLINK("https://example.com/invoices/" & A2 & ".pdf", A2 & " Invoice")

Result: Acme Corp Invoice

The formula concatenates the base URL with the customer name from A2 and the .pdf extension, producing a full link to that customer's invoice. The second argument builds a friendly label by appending " Invoice" to the same name. When the cell is clicked, the browser navigates to https://example.com/invoices/Acme%20Corp.pdf, while the displayed text remains concise and readable.

2. Link to a plan-details page using a static label

CustomerPlanMRRSignup DateChurn Date
Beta LLCBasic3002023-03-012024-02-28
=HYPERLINK("https://example.com/plans/" & B3, "Plan Details")

Result: Plan Details

Here the link_location is built from the plan name in column B (row 3) and a constant URL prefix, pointing to a web page that describes the "Basic" plan. Because a friendly_name of "Plan Details" is supplied, the cell shows that generic label for every row, keeping the column width uniform while still directing the user to the correct plan page.

3. Show the raw churn-report URL when no label is given

CustomerPlanMRRSignup DateChurn Date
EpsilonBasic3002023-09-05
=HYPERLINK("https://example.com/churn/" & A6)

Result: https://example.com/churn/Epsilon

When the optional friendly_name argument is omitted, HYPERLINK returns the link_location itself as the visible text. The formula builds a URL that points to a churn-report for the customer in A6. Clicking the cell opens the report, and the user sees the full URL, which can be useful for audit logs or when you want to expose the exact address.

Common errors

Which HYPERLINK error are you seeing?
HYPERLINK returned an error#VALUE!
Provide a valid text URL, for example wrap the cell reference in TEXT() or concatenate a non-blank string before calling HYPERLINK.
#REF!
Update the formula to point to an existing cell or use an absolute reference that remains valid after structural changes.
#NAME?
Correct the spelling to HYPERLINK and ensure no named range or macro shadows the built-in function name.
ErrorWhy it happensHow to fix it
#VALUE!The link_location argument is an empty string or contains a value that cannot be interpreted as a URL, such as a number without conversion.Provide a valid text URL, for example wrap the cell reference in TEXT() or concatenate a non-blank string before calling HYPERLINK.
#REF!The link_location refers to a cell that no longer exists because a column or row was deleted after the formula was written.Update the formula to point to an existing cell or use an absolute reference that remains valid after structural changes.
#NAME?The function name is misspelled (e.g., HYPERLNK) or a custom name collides with a reserved word, causing the parser to treat it as an unknown identifier.Correct the spelling to HYPERLINK and ensure no named range or macro shadows the built-in function name.

Tips and when to use something else

  • Store the base URL in a single cell (e.g., $Z$1) and reference it in HYPERLINK to make bulk updates easier.
  • Combine HYPERLINK with TEXTJOIN or CONCAT to build more complex URLs that include query parameters like customer IDs.
  • If you only need to embed a static URL without a clickable label, you can skip the second argument; the function will display the URL itself.
  • When you need to retrieve data from the linked page rather than just open it, consider using IMPORTHTML (Google Sheets) or Power Query (Excel) instead of HYPERLINK.

Frequently asked questions

How do I create a clickable email link with HYPERLINK?
Use the mailto protocol inside the link_location, for example =HYPERLINK("mailto:" & B2, "Email " & A2). The displayed text can be any friendly name, and clicking the cell opens the default email client with the address pre-filled.
Can HYPERLINK open a file on my local computer?
Yes, provide a full file path such as =HYPERLINK("C:\Reports\" & A2 & ".xlsx", "Open Report"). Note that some browsers and cloud versions of Sheets may block local file links for security reasons.
Why does HYPERLINK return #VALUE! even though the URL looks correct?
The error often occurs when the URL contains unsupported characters or is stored as a number. Wrap the URL in TEXT() or encode spaces as %20 to ensure the function receives a proper text string.
Does HYPERLINK work the same way in Google Sheets as in Excel?
The core behavior is identical, but Google Sheets does not support opening local files, and the function may automatically convert relative URLs to absolute ones. Also, Sheets evaluates the link when the cell is rendered, so a formula that returns an empty string will show a blank cell rather than a broken link.

Need a different formula?

The full generator is not scoped to one function — describe any spreadsheet problem and it will pick.

Open the formula generator