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. With years of experience working with Google Sheets and Excel for multinational firms in Mumbai and Dubai, he has been blogging since 2012, offering practical, real-world spreadsheet solutions that professionals rely on. Explore his blog to learn advanced formulas, automation tips, and problem-solving techniques to elevate your spreadsheet skills.

Mode of Comma-Separated Numbers in Excel (Dynamic Array)

There is no dedicated function in Excel to directly find the mode of comma-separated...

How to Find Mode of Comma-Separated Numbers in Google Sheets

Working with comma-separated numbers inside a single cell is a common scenario in Google...

How to Count Merged Cells in Google Sheets (and Get Their Size)

Sometimes, you may have blocks of merged cells in a column or row. But...

Count Consecutive Workday Absences in Google Sheets

This tutorial offers a powerful formula-based solution to count consecutive workday absences in Google...

More like this

How to Find Mode of Comma-Separated Numbers in Google Sheets

Working with comma-separated numbers inside a single cell is a common scenario in Google...

How to Count Merged Cells in Google Sheets (and Get Their Size)

Sometimes, you may have blocks of merged cells in a column or row. But...

Count Consecutive Workday Absences in Google Sheets

This tutorial offers a powerful formula-based solution to count consecutive workday absences in Google...

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.