Filter a Database in Google Sheets based on Dates, Checkboxes, and Dropdown selections!
In today’s tutorial, we’ll be answering the question from Mohamed. The question is “How do I filter a database in Google Sheets based on dates, checkboxes, and dropdown selections?”
In today’s tutorial, we’ll be answering the question from Mohamed. The question is “How do I filter a database in Google Sheets based on dates, checkboxes, and dropdown selections?”
The actual problem is he has a list of cars. He wants t filter out everything that is outside of the start date and end date. I'm not sure if these are particularly the date of sale or date of creation. There is a little bit of interesting thing you can do with dates.
What you'll get when you finish this tutorial
With this tutorial, you’ll learn how to filter everything that is outside of the start and end dates. It’s basically learning how to filter between two dates.
You’ll also learn how to filter different situations using checkboxes.
Are you ready to learn something new today? Let’s get started!
Two particular problems
There are two particular problems here. He's asking for a car type Nissan only or Nissan and Toyota. In order to solve this challenge, there are a few ways to deal with this. It's just a little complicated question because the answers are vastly different. I'm going to get through this as best I can with the information I have. It’s absolutely understandable if this is not the correct answer.
The very first thing I'm going to do is I'm going to create a list of cars with these kinds of data. I'm now going to show you how to set this up.
Setting up the database function
The first thing we have is a database.
He's asking for a database function where you have the table of raw data. You see everything, including the bar above that you can filter.
First, have to have a database on a separate tab so that you can filter. I've created that tab. I've also created IDs so we know what we're getting.
We're getting some other information other than just the type and the country. I've added Mexico here and some other countries. These are totally random.
I don't know if this is a data sale or date of purchase or anything else, but we had some random dates here.
Now let’s go to the “Filter” tab; Type the following formula:
=filter(DB!A2:D16,DB!A2:A16>0)
We’re going to get everything for this formula to work. We need to filter something. We want everything under the ID column.
For the part with 0, that's going to need to be the same thing. Basically, it needs to look at the exact same range, so your database and your filter need to be the same thing there or you'll get an error.
We have everything we need now. Don’t forget to put the headers, like ID, Date, Type, and Country.
Continue here: https://blog.bettersheets.co/filter-a-database-in-google-sheets-based-on-dates-checkboxes-and-dropdown-selections/