ISURL Function in Google Sheets: Check and Validate URLs

Published on

The ISURL function in Google Sheets is categorized under Web functions and is used to check if a value is a valid URL.

The ISURL formula returns TRUE or FALSE based on whether the provided input is a valid URL. If the formula returns TRUE, it recognizes the input as a valid URL.

In Google Sheets, URLs are typically displayed with blue, underlined text, but even if they aren’t visually linked, the ISURL function can still verify their validity.

Syntax

ISURL(value)
  • value: The value (supposed URL) to be verified.

ISURL Function: Example and Explanation

The ISURL function doesn’t require a URL to include “http” or “https” protocols, or the “www” subdomain, to return TRUE. A URL without these elements can still be considered valid.

Refer to the screenshot below for examples.

Example of the ISURL Function in Google Sheets

According to Google’s documentation, ISURL supports the following protocols:

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

Additionally, note that the localhost domain (as shown in cell A9, with output in cell B9) is considered a valid URL in Google Sheets.

This means a top-level domain (TLD) like .com, .org, or .net is not necessary for a URL to be validated.

Using ISURL in Conditional Formatting

To highlight valid URLs in Google Sheets, you can use the ISURL function as a custom formula in Conditional Formatting.

Example:

Let’s say you want to highlight valid URLs in column A (range A2:A21). You can use this custom formula:

=ISURL(A2)
Using the ISURL Function to Highlight URLs in Google Sheets

To apply this formula, first select the range you want to highlight and go to Format > Conditional formatting. Under the conditional formatting options (Format rules), select Custom formula is and enter the formula provided. Choose a formatting style and click Done.

Validating URLs with Data Validation

You can use Google Sheets’ built-in Data Validation rule to restrict data entry to valid URLs only.

Steps:

  1. Select the range where you want to allow valid URLs.
  2. Go to Data > Data validation.
  3. Click the +Add rule button.
  4. Under the Criteria dropdown, select Text is a valid URL.
  5. Click Done.

You can now enter only valid URLs in the selected range. For example, the settings below validate URL entries in the range A2:A10 in ‘Sheet2887’.

Validating URLs in Google Sheets

Checking URLs in Multiple Rows

To check URLs across multiple rows or columns, use the ArrayFormula function with ISURL.

Example:

To check URLs in the range A2:A13, use the following formula in B2, assuming that B2:B13 is blank.

=ArrayFormula(ISURL(A2:A13))

Hyperlinking Valid URLs

You can create hyperlinks for valid URLs using a combination of the IF, ISURL, HYPERLINK, and ArrayFormula functions. Here’s an example formula that hyperlinks valid URLs in the range A2:A13:

=ArrayFormula(IF(ISURL(A2:A13), HYPERLINK(A2:A13), ""))
Combined Use of ISURL and HYPERLINK Functions
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.