How to Remove Duplicate Hyperlinks in Google Sheets Like a Pro

If you’ve ever faced the challenge of dealing with duplicate hyperlinks in Google Sheets, where the labels are the same but the URLs are different, you’re in luck! In this article, I’ll reveal the secret formula to tackle this unique challenge and clean up your data effortlessly.

Unleashing the Power of Hyperlinks in Google Sheets

Did you know that hyperlinks in Google Sheets can serve multiple purposes? They are incredibly versatile and can be used in various ways. Here are just a few examples:

  • Jump to any cell in the current Google Sheets file, regardless of the tab.
  • Link to a separate Google Sheets file from the current file.
  • Link to any valid URLs, such as wiki pages or your favorite tutorials.

Now, let’s dive into the two methods of inserting hyperlinks in Google Sheets, and I’ll guide you through each of them.

The Trick to Removing Duplicate Hyperlinks in Google Sheets

Let’s cut to the chase. We want to remove duplicate values, even when the hyperlinked URLs differ. Take a look at the example below, where the labels/values in column A are the same, but the URLs are different.

Screenshot #1

As you can see, applying the UNIQUE formula in cell C2 has no effect on these values. This is because the linked URLs are different, and only the labels are the same for the first two values.

So, how do we bypass the hyperlinked URLs and only consider the labels when using the UNIQUE function? Here’s the formula:

=unique(query(A2:A4))

By utilizing the QUERY function to remove the linked URLs, we allow the UNIQUE function to eliminate duplicates based on the labels alone. Check out Screenshot #2 below for a visual demonstration.

Screenshot #2

Pro Tip: Quickly Remove Hyperlinks Using a Formula in Google Sheets

If you ever need to remove hyperlinks using a formula in Google Sheets, simply wrap the range with QUERY. This effectively disables the hyperlink functionality.

Now, let’s move on to an example with two columns of data.

Removing Duplicate Hyperlinks in Two Columns

In this scenario, we have values in both column A and column B. However, we want to achieve the unique effect only in column A while retaining a two-column output. Take a look at Screenshot #3 below for a visual reference.

Screenshot #3

To accomplish this, we’ll combine the power of the SORTN function with QUERY:

=sortn(query(A2:B4),9^9,2,1,1)

In this case, the QUERY function once again removes the linked URLs. Since we have two columns, we can’t use UNIQUE on just the first column while retaining the second. But fear not, because SORTN comes to the rescue. It allows us to specify the tie mode for uniqueness.

Now, armed with these techniques, you have the knowledge to conquer duplicate hyperlinks in Google Sheets. Whether you choose to use UNIQUE or SORTN with QUERY, you can effectively clean up your data and ensure a seamless user experience.

That’s it! You’re now equipped with the secrets to master duplicate hyperlinks in Google Sheets. For more helpful tips and tutorials, visit Crawlan.com.

Now go forth and conquer your duplicate hyperlink challenges in Google Sheets like a pro!

Related posts