We will use ISURL function to validate URLs in Google Sheets. We will also try to validate URLs in Google Sheets using Data Validation.
What is URL validation?
URL validation is a process of checking if the given URL is a legitimate one or not. This can be because for many reasons. Invalid URLs can cause a blocker in the operations if you are using the data for integrations. It can also be a security threat. Hence it becomes very important to check the URLs before accessing them.
Additional, data validation is a good practice when maintaining tables and datasets. It is a must if you are passing the file to integration through an FTP site or any other source. This article talks about the need for data validation and the practices you should follow regarding the same.
The syntax for the function is as follows:
Value: The string value that we want to validate. It can also be a reference to the cell containing the string value. Also note that Google Sheets will automatically link text entered into a cell if ISURL returns true. Also, you don’t need to add “http” or “www” etc before the URL to make this work.
The following are the valid protocols in ISURL function:
Validate URLs in Google Sheets using Data Validation
We can also use the Data Validation option to Validate the URL inside a cell. To do so, follow the given steps:-
- Select the range you want to validate data in
- Go to Data->Data Validation
- Select “Text” in the criteria and then Select “is a valid URL”
- Then Click Save
The resultant URLs would look like this. Incorrect URLs would be marked and a comment would be added to the same.
We’ve seen several ways to validate URLs in Google Sheets. You can also use the ISURL function with other logical operators to get custom results.
Want to know more formulas and functions in Google Sheets? Look at our definitive guide on Google Sheets which covers hundreds of such topics here. Enjoy reading!
Most Commonly Used Google Script Functions for 2022: Learn about the most commonly used Google Script functions in Google Sheets.
Google Sheets: AVERAGEIFS Function | Easy Guide: Learn how to use the AVERAGEIFS Function in Google Sheets.