In this tutorial, we will cover everything there is to know about Data Validation in Google Sheet.
Why am I writing this tutorial? Well, there is a lot to cover for one, but I also find that there are a lot of snags and nuances to Data Validation in Google Sheets that make it easy for even the experienced user to get stuck.
I didn’t start out to write a course on data validation. To be honest, I was just preparing some notes for a short introduction as a part of a beginners video series, but the more I looked at it the more I found that data validation really deserves a deep dive on its own.
There are even some things in this course that I learnt that I wish I had known years ago that would have saved me and my team a lot of grief.
If you are coming at data validation as a complete beginner or a seasoned spreadsheets veteran, there should be something in here for you to learn. Below you will see a contents page of major topics and you will also find an embedded video tutorial for each of the topics if you need to just jump to something important.
Using the contents page to jump to a link will also give you a URL to that item if you want to bookmark it for quick reference later.
Let’s dive in!
Table of Contents
Data Validation Basics
What is data validation?
Data validation helps you to control what your users enter into your cells. Among many other things it also allows you to:
Create drop-down menus for your users.
Provides date pickers.
Ensure users of your Google Sheet to enter text into a cell only.
Validate emails and URLs.
Even create designer rules for your users to abide by to ender data in a cell.
Why is data validation important?
Let’s say you need users to put in a set of numbers in a cell. These numbers are then calculated in another cell by one of your awesome formulas. Perhaps your data entry users were not properly instructed or were confused about their task. Without data validation, they could put in words instead, breaking your carefully crafted formula.
Likewise, you may want to reduce responses to a question you have asked in a sheet to specific items that your users select from a dropdown list for you to better analyse the frequency of the response. Without data validation rules, your users could enter any response that may well be similar, but is now incredibly difficult for you to analyse.
Finally, you may just want to help guide your uses and provide convenient suggestions for them to enter their data in cells. You can also do this with data validation.
Right-click and scroll to the very bottom and select view more cell actions << data validation.
Data Validation basics video
Check out the Data Validation basics video for a quick tour of what this Google Sheets tool can do for you:
In the video tutorial, I’ll cover,
00:17 Accessing the data validation menu.
00:41 What does each part do?
01:12 What can I choose to use data validation for?
02:10 Criteria – List from a range in your Google Sheet.
04:49 Criteria – List of items not in your Google Sheet.
05:18 Criteria – Having to choose a Date.
06:29 Criteria – Choosing numbers between a range.
08:14 Removing Data Validation
List from a range. Dropdowns!
In this part of the course, we will dive into creating dropdown menus from reference data in your Google Sheet. I’ll guide you through how to set up and organise your reference data to work best for your data validation list from a range dropdown.
We will even dip our toes into creating a basic dynamic dropdown list that changes based on your selection of a previous dropdown list.
Check out the video below!
In the video tutorial, I’ll cover,
00:00 Preview of what our dropdown will look like.
00:22 Creating an ordered dropdown list from a range of cells.
01:59 Creating a dropdown list from horizontal data.
02:45 Create a dropdown list from a matrix of data.
03:50 Using relative and absolute values for dynamic lists.
05:57 Wrapping up data validation list from ranges.
An extra note on relative and absolute ranges in data validation in Google Sheets
As we mention in the video above, you can make your dropdown somewhat dynamic by using relative ranges.
With a normal Google Sheets formula or function in a cell, you are able to drag down the cell to duplicate the range. In this case, the formula will update automatically and reference the data in the next row or column of the cell depending on if you dragged the data down or across.
For example, in cell C1 we have the formula = A1 + B1. If we drag C1 down to cell C2. Then the formula in that cell would be = A2 + B2. Drag it down again and the formula is =A3 + B3 and so on.
If you don’t want your formula reference to change you are ostensibly locking them and making them absolute.So if we want to just add A1 to all the cells in column B we could change our column C equation to look like this = A$1 + B1 for our first row. The dollar sign indicates that row one will be locked or made absolute.
Dragging the formula down now to cell C2 will result in this = A$1 + B2, C3 to = A$1 + B3 and so on.
We have locked the row in place.
If we drag our C1 cell to the right to cell D1, however, we would get this = B$1 + C1 . So to lock cell A1 from moving to the right we need to lock the column too with a dollar sign like this = $A$1 + B1.
You can find out more about relative and absolute cell references in my tutorial here:
In data validation, it is a little different, however. Your data validation’s row and column cell references will come locked or absolute out of the box. You will need to update them manually. You can do this by adding an equals sign at the front of your range and removing the relevant dollar sign ($) reference, just like in the video.
List of Items
You can also create a data validation dropdown list from a list of items in your Google Sheets cells. One of the benefits of this is that you don’t need to reference any data in your Google Sheet.
Nevertheless, there are some things to consider and I will be covering them in the video below.
Check it out!
00:00 Introduction to creating a list from a range with data validation.
00:08 Why use List of Items rather than List from a Range.
00:18 What it all looks like.
00:30 Creating a list from items.
01:43 Duplicating the dropdown.
02:01 A better approach to duplicating data validation rules.
You can also restrict cells to only display numbers or even ranges of numbers. Google Sheets data validation has a large list of rules to help you set your cells up just how you want them. Having said that, there are some pitfalls that you may fall for that I hope to steer you away from in this video below. I’ll also show you a few alternate solutions.
Have a gander!
00:00 Intro to using number data validation.
00:25 Number is between two digits.
01:14 Can I use decimal numbers?
01:32 Numbers is not between to digits.
02:18 Enter a number less than a value.
02:52 Number is less than or equal to a value.
03:15 Number is greater than a value.
03:43 Number is greater than or equal to a value.
04:07 Number is equal to a value.
05:12 Number is not equal to a value.
05:31 Number is between multiple sets of ranges.
Validating Text, Emails and URLs
The text data validation in Google Sheets is more than just validating some simple text, it allows you to check if certain text exists in your cells or not. The text criteria allow you to check for valid emails and URLs. However, like most technology, there are some limitations that we will highlight in the tutorial below:
00:00 Intro to using text validation in Google Sheets.
00:11 Enter text that contains certain a certain string of text characters, word or phrase.
3:05 Enter text that does not contain a certain string of text characters word or phrase.
03:54 Enter text that equals a certain string of characters, word or phrase.
04:19 Enter a valid email.
05:36 Enter a valid URL or website.
While text validation has a few weaknesses we can use custom formulas to resolve these. I will provide a few examples in part 1 of using custom formulas with data validation.
Validating Dates and a Date Picker in Google Sheets
I’ve really leaned on date data validation quite a lot in my Google Sheets career. It is extremely helpful to help guide users into putting in the correct date into the spreadsheet that you need to conduct good analysis.
We will also talk about educating your team on using the hand dandy date picker!
Check out the video!
00:00 Intro to date validation.
00:16 Enter a valid date (My favourite!).
00:34 Users entering different date formats. Is it a problem?
01:04 Formatting data validation cells. The solution to many of your date validation issues.
01:47 Displaying a date picker and quickly showing your users how to find it.
02:49 Enter date equal to a specific date.
03:41 Enter date before a specific date.
04:58 Enter date on or before a specific date.
06:52 Enter a date after a specific date.
07:20 Enter a date on or after a specific date.
08:10 Enter a date between two dates.
09:20 Enter a date that is not between two dates.
09:56 Wrap up.
While there might seem like a bit of repetition in this tutorial, I have sprinkled in a few troubleshooting tips and tricks along the way to help you better prepare your date validation.
Custom Data Validation with Using Simple Regular Expressions
I won’t lie, exploring the depths of custom data validation is a vast and endless rabbit hole (Of fun! 🐐).
I’ve gone ahead and split up this part of the course into two chapters. This first one explores using custom data validation with regular expressions.
Wait! Please done run away. Here! Here’s a cookie… 🍪. Okay, gang! Grab em and hold them down! Someone get the eye vices.
Yeah, yeah, regular expressions can be scary. They are so esoterically irregular (Pun intended) that they can be quite difficult to memorise or master. But I will let you in on a little secret: only the most bespeckled, sun fearing of goats memorise data validation rules. The rest of us just look them up.
In this chapter, we will cover just a few very common rules that you can simply copy and change for your own use. Hopefully, they should be useful for your day to day Google Sheets work.
More Data Validation Using Custom Formulas in Google Sheets
In this second part of using custom formulas in our data validation, we will branch out and use some other formulas to create some interesting validation rules. We will also start using some more compound formulas that I hope will inspire you to create your own custom formula rules. If you come up with a good one I would love to hear about it in the comments below.
I’ll be sure to add the formula examples for each part in the show notes below the video if you want to copy and modify them for your own project.
00:00 Intro to custom formulas in data validation part 2.
Formula example: =AND(LEN(B9) = 10, NOT(REGEXMATCH(TO_TEXT(B9),"\D|\s")))
10:14 Whole numbers between 1-20.
Formula example: =AND(ISNUMBER(B10), NOT(REGEXMATCH(TO_TEXT(B10),""[.]"")), B10>0, B10<21)
12:37 Wrap Up
Oh…yeah. I squeezed in some more regular expressions too. Umm…sorry. Not sorry. 🐐
Using Data Validation on Checkboxes
In this chapter, we will look at how we can control check or tickboxes in Google Sheets. One of the cool things I discovered is that I changed the true and false condition to whatever I want.
Such power! Yes, I abused it.
Have a look a the video, if you dare!
00:00 Intro checkbox validation.
00:10 Enforce entry of true and false in a cell.
01:18 Change what is truthy and what is falsy.
02:38 Changing a checkbox from another cell.
04:21 Wrap up.
Update dropdown list in Google Sheets dynamically based on previous dropdown choice
That’s a mouthful. However, this is one of the most searched for things people want to do with data validation. In our previous chapter on List from a Range we covered one approach, but it is kinda messy.
Here, I will give you a more appropriate example on how to create a dropdown menu that changes based on another menu choice.
One great example of this is a list of cities after you have chosen a state. Or a list of parts once you have selected a specific tool.
Here is the link to the starter file if you want to follow along. Go to File > Make a copy to generate and edit your very own version.
31 May 2022 – Updated List from a range. Dropdowns! video with an updated ending that better describes the dynamic and static movement of selected ranges when they are duplicated down or across a sheet.