How to Label a URL in Google Sheets Using the HYPERLINK Function

Published on

The HYPERLINK function in Google Sheets allows you to label URLs, making them more user-friendly by displaying custom text instead of the full web address. In this post, we’ll explore how to label a URL in Google Sheets using the HYPERLINK function.

What Is a URL?

A URL (Uniform Resource Locator) is simply the web address of a website or a webpage. When you open a webpage in your browser, you can find the URL in the address bar at the top.

As a side note, in a Google Sheets file (workbook) with multiple sheets, each sheet has its own specific URL, and you can even generate a URL for individual cells. To get a cell’s URL, right-click on the cell, then in the menu that appears, click View more cell actions > Get link to this cell. This allows you to easily share or reference specific cells within a Google Sheets document.

What Does “Labeling a URL” Mean?

Labeling a URL refers to replacing a long, cumbersome web address with a short, readable label or title that represents the link. Instead of displaying a URL like https://example.com/, you can use the HYPERLINK function to display it as “Click Here” or any other custom text. This makes spreadsheets cleaner and easier to read.

Example of Labeling a URL in Google Sheets

Take a look at the following example:

Labeled URLs in Google Sheets
  • In cell A1, you see a raw URL: https://example.com/
  • In cell B1, you see a labeled URL: Example Website

Both are clickable and clicking either will take you to the same webpage. The difference is that the labeled link in B1 is much cleaner and more readable.

To label a URL in Google Sheets, you use the HYPERLINK function. Here’s the syntax:

Syntax:

HYPERLINK(url, [link_label])
  • url: The web address (URL) you want to link to.
  • link_label: The text you want to display for the link (optional). If you omit this, the URL itself will be displayed.

Example:

=HYPERLINK("https://infoinspired.com/google-docs/spreadsheet/google-sheets-function-guide/", "Function Guide")

In this example, the URL points to a webpage, but the link will display as “Function Guide” in the cell, creating a labeled URL.

When using the HYPERLINK function, you need to ensure the URL is correctly formatted. If the protocol (e.g., http:// or https://) is missing, Google Sheets will automatically prepend http://, which might not always be correct. For instance, omitting the protocol can cause issues if you’re working with secure (https://) or specific (ftp://, mailto:) links.

For example, using a URL without the protocol:

=HYPERLINK("example.com", "Example Website")

Would result in an incorrect link (http://example.com), potentially causing navigation errors. Always include the full protocol in your URL:

=HYPERLINK("https://example.com", "Example Website")

According to official documentation, the supported link types include:

  • http://
  • https://
  • mailto:
  • aim:
  • ftp://
  • gopher://
  • telnet://
  • news://

Labeling Multiple URLs at Once

If you need to label multiple URLs at the same time, you can use the ARRAYFORMULA function in combination with HYPERLINK. This allows you to apply the HYPERLINK function to a range of URLs, saving you time from manually labeling each one.

Here’s an example of labeling URLs in column A using labels from column B:

=ArrayFormula(HYPERLINK(A2:A6, B2:B6))
Using the HYPERLINK Function with ARRAYFORMULA

In this example:

  • Column A contains the URLs.
  • Column B contains the corresponding labels.
  • The formula labels all the URLs in A2:A6 using the labels in B2:B6.

This method allows you to easily modify the labels if needed, as you can simply change the text in column B, and the HYPERLINK function will update accordingly.

Conclusion

Now that you know how to use the HYPERLINK function, labeling URLs in Google Sheets becomes much easier. You can create cleaner, more professional-looking spreadsheets by turning long URLs into readable, clickable text.

If you need to label multiple URLs at once, combining HYPERLINK with ARRAYFORMULA can streamline the process and save time. Try it out in your own Google Sheets and enjoy the improved readability!

Resources

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Expert Prashanth KV is a Diamond Product Expert in Google Sheets, officially recognized by Google for his contributions to the Docs Editors Help Community and featured in the Google Product Experts Directory. Explore his blog to learn advanced formulas, automation tips, and problem-solving techniques to elevate your spreadsheet skills.

Google Sheets: Get the Last Row with Any Data Across Multiple Columns

It’s common to have several empty rows at the bottom of a Google Sheet,...

How to Calculate Digital Root in Google Sheets

The digital root is the single-digit value you get by repeatedly summing the digits...

How to Build an Advanced Book Tracker in Google Sheets: Formulas Explained

If you're tired of forgetting what you've read, which books you rated 5 stars,...

Google Sheets Reading List Tracker Template (Free Download)

Looking for a smarter, more visual way to manage your reading goals? This Google...

More like this

Google Sheets: Get the Last Row with Any Data Across Multiple Columns

It’s common to have several empty rows at the bottom of a Google Sheet,...

How to Calculate Digital Root in Google Sheets

The digital root is the single-digit value you get by repeatedly summing the digits...

How to Build an Advanced Book Tracker in Google Sheets: Formulas Explained

If you're tired of forgetting what you've read, which books you rated 5 stars,...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.