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 Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

Highlight Upcoming Birthdays in Google Sheets

When highlighting upcoming birthdays in Google Sheets, one important aspect is ignoring the year...

Compare Two Tables for Differences in Excel

To compare two tables with similar data for differences, you can use the XLOOKUP...

Calculate Weighted Average in Pivot Table in Google Sheets

You can calculate a weighted average in a Pivot Table using a custom formula...

Summarize Data and Keep the Last Record in Google Sheets

In Google Sheets, we can summarize data (like sum, average, min, max, count) using...

More like this

Highlight Upcoming Birthdays in Google Sheets

When highlighting upcoming birthdays in Google Sheets, one important aspect is ignoring the year...

Calculate Weighted Average in Pivot Table in Google Sheets

You can calculate a weighted average in a Pivot Table using a custom formula...

Summarize Data and Keep the Last Record in Google Sheets

In Google Sheets, we can summarize data (like sum, average, min, max, count) using...

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.