HomeGoogle DocsSpreadsheetThe ISURL Function in Google Sheets - Check/Highlight/Validate URLs

The ISURL Function in Google Sheets – Check/Highlight/Validate URLs

Published on

The ISURL function in Google Sheets is one of the Web functions (categorized under Web). Needless to say, the only purpose of this simple function is to check valid URLs.

The ISURL formula will return TRUE/FALSE values based on the value (supposed URL) provided as the input. If the formula returns a TRUE, then that the provided ‘value’ is a valid URL.

The entered URLs are normally linked (visually different from other values by blue color font and underline) in Google Sheets. Even if the URLs are not linked, the ISURL function can successfully check the validity of the URLs.

Syntax:

ISURL(value)

Argument:

value – The value (supposed URL) to be verified.

Formula Example and Explanation:

Example to ISURL Function in Google Sheets

From the above examples, it’s clear that http / https protocols and the www subdomains are not required in all cases to validate (formula returns TRUE) a URL.

As per the Docs help center article, the below are the valid protocols in the ISURL function in Google Sheets.

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

Also please note that the localhost domain (please refer to cell A9 and the formula output in cell B9 above) does pass URL validation in Google Sheets. That means TLDs, i.e. .com, .org, .net., .gov, etc., are not a must to pass the URL validation/check.

How to Use the ISURL Function in Conditional Formatting in Google Sheets

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

To highlight URLs, as an example, I am considering the above same values in column A, I mean the range A2:A.

Custom ISURL Formula for Highlighting URLs in Sheets:

=isurl(A2)

Without much explanation, I hope, you can understand how to apply this custom ISURL formula in conditional formatting from the below screenshot.

ISURL Function to Highlight URLs in Google Sheets

Validate URLs in Data Validation in Google Sheets

I just want to allow valid URLs in a range in Google Sheets. How to do that?

Google Sheets Data Validation has a built-in rule to restrict entering invalid URLs in a cell or range. To apply this rule, do as follows.

  1. Select the range to validate URL entry.
  2. Go to Data > Data validation.
  3. Under Criteria drop-down, select “Text”.
  4. Select “Is a valid URL” from the next drop-down.

The below Data Validation settings are for the range A1:A10.

Data Validation - URLs in Docs Sheets

Check URLs in Multiple Rows and Hplerlink

Here is a bonus tip! To check URLs in several rows or columns, we can use ArrayFormula with ISURL as below.

Array Formula to test URLs in the range A2:A13.

=ArrayFormula(isurl(A2:A13))

To hyperlink valid URLs you can use the following combo formula (a combination of IF, ISURL, Hyperlink and ArrayFormula functions).

ISURL and HYPERLINK Functions - Combo Use
=ArrayFormula(if(isurl(A2:A13)=TRUE,hyperlink(A2:A13),))

Related Reading:

  1. Extract URLs in Google Sheets Without Script.
  2. Search Value and Hyperlink Cell Found in Google Sheets.
  3. Create Hyperlink to Vlookup Output Cell in Google Sheets.
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.

SORT and SORTBY – Excel Vs Google Sheets

While Excel offers the SORT and SORTBY functions for sorting a table, Google Sheets...

Get Top N Values Using Excel’s FILTER Function

When using the FILTER function in Excel to extract the top N values, it's...

XLOOKUP in Excel: Working with Visible Rows in a Table

In Excel, the XLOOKUP function isn't inherently designed to exclusively work with visible rows;...

SUMPRODUCT Differences: Excel vs. Google Sheets

The core purpose of the SUMPRODUCT function remains consistent across both Excel and Google...

More like this

Interactive Random Task Assigner in Google Sheets

You have multiple tasks and multiple people. Here's a fun way to randomly assign...

Google Sheets Bar and Column Chart with Target Coloring

To color each data point in the column or bar chart according to the...

Analyzing Column A Between Non-Adjacent Values in Column B: Google Sheets

This tutorial addresses a common scenario encountered in Google Sheets: how to sum, average,...

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.