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 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.

Hierarchical Numbering Sequences in Excel

Creating hierarchical numbering sequences in an Excel spreadsheet can significantly improve the way you...

How to Easily Repeat a Sequence of Numbers in Excel

Excel offers multiple ways to accomplish tasks, and the simplicity of each approach depends...

Create a Sequence of Dates at Every Nth Row in Excel (Dynamic Array)

Would you like to create a sequence of dates in every nth row in...

XMATCH Row by Row: Finding Values Across a Range in Google Sheets

Using the BYROW function with XMATCH in Google Sheets allows us to match values...

More like this

XMATCH Row by Row: Finding Values Across a Range in Google Sheets

Using the BYROW function with XMATCH in Google Sheets allows us to match values...

Limit Formula Expansion to a Specific Row in Google Sheets

In this tutorial, I’ll explain how to limit the expansion of an array formula...

3-D Referencing Structured Data Tables in Google Sheets

When you have several tables within a single sheet—not across multiple sheets in a...

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.