How to Checkbox if Date This Year in Google Sheets
Learn how to efficiently use checkboxes in Google Sheets to automatically check off dates that fall within the current year or the past year. This video provides a simple formula to streamline your data management.
Okay, so my boss gave me this task, which is I will need to check off every date in this list that's this year. So we entered a checkbox , and I have to literally, like, look through this list. No, I'm gonna show you a really simple way. So this checkbox , if it's checked, it means true. If it's unchecked, it means false. However, this is just a visual representation of the data . The actual data in the sheet, in the cell is either true or false. It's just text. If I delete the data and I check, it just changes it to true. This is me doing it, but the cell itself could also change the check mark as long as it is resolving to true. I'll show you with a formula .
We just type in, instead of false, instead of true, instead of nothing, we type in equals, and we say B2, and we can say, " Wrap this with year," and the result is twenty sixteen. But we need it to be either true or false. If I just hit this, it'll give me invalid. It, it'll show the year, twenty sixteen. That's not what we want. We want to check if it's this year, check. So we s-go equals year, and we wrap today around it. Or we say twenty twenty-six if it's like, "Hey, not just this year, but actually I need to check off everything that is twenty twenty-six." So that's a slight variation. If it's just twenty twenty-six that we're checking off, all the years that are twenty twenty-six, do this.
Just type in two zero two six. But if you wanna automate it and say, "Just check off the dates that are this year," meaning n-this time next year, it needs to check off the ones that are twenty twenty-seven or twenty twenty-eight or twenty twenty-nine, then wrap year around today, and your job will be done on January first, twenty twenty s-seven because it'll check off all the dates that are twenty twenty-seven. So that shows false, but if I copy and paste this all the way down, we will see that, ah, this check box is checked, and yes, this date is this year. However, one thing does happen to our checkboxes. They're not interactive anymore. We can't check them off or check 'em or uncheck 'em.
Now, their entire representation of true or false, the actual underlying data , is based on the B column. So if we change this to today, now it's checked off. See? So now we have changed fundamentally where the data source is from a checkbox that we check off to the date. Pretty cool, right? If you're thinking, "Hey-" I'm just a little bit off. I actually don't want this year. I want anything within the past year or past three hundred and sixty-six days. Then we can say, okay, let's see that B2 is greater than today minus three sixty-six. That's a year ago. Let's change this to, like, yesterday, right? It's not today. But this formula now is either true or false, that it's today, three
hundred and sixty-six days ago, is this in B2 greater than that? Let's copy and paste that all the way down. Let's see, this one, if we change this to, let's say, the end of last year, it's still checked off because it's within the last year. Pretty cool, right? We can do check if it's this year or check if it's within the past year. I think this has been awesome. I think this is a really fun little implementation of checkboxes that they are really, in this case, a representation of just true or false. You are watching better sheets here on YouTube. Make sure you check out this video or this video and subscribe right now to get more tips, tricks, how tos, get more out of your Google sheets than you ever have before.
I'm excited to be making a ton more videos here. Ask me questions down in the comments and I will answer them in future videos. But for right now, right here, one of these videos is gonna be your next Google sheet.