Examples

HYPERLINK("https://www.google.com", "Google") :  Google

HYPERLINK("https://www.appsheet.com", "AppSheet home page") :  AppSheet home page

HYPERLINK("https://www.appsheet.com/samples/How-to-link-to-a-URL-with-custom-text?appGuidString=3f55edfc-aa53-47fc-a206-469720f10b13", "Hyperlinks sample app") :  Hyperlinks sample app

HYPERLINK([Vendor Site], [Vendor Name]) : A hyperlink pointing to the URL in the Vendor Site column, with clickable text from the Vendor Name column.

Encode Text for URL

Certain characters, such as ampersand (&), colon (:), slash (/), and even a space, have special meanings within URLs. Text included in URLs that contains special characters should be "encoded" to remove the special meaning and avoid problems. The ENCODEURL() function is provided for this purpose.

HYPERLINK(
  CONCATENATE(
    "https://www.google.com/search?q=",
    ENCODEURL([Product Name])
  ),
  ("Search for " & [Product Name] & " on Google")
)
  1. HYPERLINK(..., ...) creates a hyperlink to the given target URL and with the given clickable text.
  2. CONCATENATE(..., ...) computes the target URL by combining the given values.
  3. "https://www.google.com/search?q=": the initial part of the target URL. This part is already properly encoded as a URL, so ENCODEURL() is not needed.
  4. ENCODEURL([Product Name]) encodes the Product Name column value, ensuring the special meaning is removed from any special characters the value may contain.
  5. ("Search for " & [Product Name] & " on Google") assembles the clickable text for the hyperlink from the given components. ENCODEURL() is not needed here because the clickable text is not part of the URL. Equivalent to CONCATENATE("Search for ", [Product Name], " on Google").

See also: CONCATENATE(), ENCODEURL()

Syntax

HYPERLINK( target-url , clickable-text )

Arguments

  • target-url (any textual type): the URL to which the user is to be sent upon clicking the link. No processing of the URL is done in constructing the hyperlink; the URL should be complete and valid.
  • clickable-text (any textual type): the text the user will see and click on.

Return Value

Url: a hyperlink composed of target-url and clickable-text.

See Also

APP(), ENCODEURL(), LINKTEXT(), LINKURL()

Did this answer your question?