Members-only tutorial
Watch the video and get the practice sheet with membership.
About this Tutorial
Sheet Resources
Video Transcript
<div>0:00 It seems like I'm learning new stuff about checkboxes all the time. This is about unchecking every checkbox Learn about checkboxes in Google Sheets and how to manage them effectively. Opens in new tab , so you probably know this.<br>0:08 Check a box, check a box. Ah, you can even select all Discover how to select all checkboxes in your Google Sheets with ease. Opens in new tab the boxes and hit the space bar. Ah, and then hit it again.<br>0:16 Again, to uncheck everything. But here's the crazy thing that I just found out. You can select some checkboxes. You can select the entire page.<br>0:25 Click here, ah, between the A and the 1. Hit the space bar. It selects all of them.
Hit the space bar again.<br>0:31 And any checkbox Learn about checkboxes in Google Sheets and how to manage them effectively. Opens in new tab anywhere on the sheet, it all unchecks. But here's the thing I want to show you in this video that I think is pretty cool.<br>0:40 Is that you can use Apps Script Explore how to use Apps Script to automate tasks in Google Sheets. Opens in new tab to actually uncheck everything. And I will explain. The reason is, ah. Say you don't actually fill out the check, like checks, like you're checking off these daily things.<br>0:54 Maybe it's a daily or an hourly checklist Understand how to create and manage checklists in Google Sheets. Opens in new tab or a weekly checklist Understand how to create and manage checklists in Google Sheets. Opens in new tab .
Whatever it is, you can schedule the Apps Script Explore how to use Apps Script to automate tasks in Google Sheets. Opens in new tab to uncheck everything that you want unchecked.<br>1:04 You can be very specific about what's unchecked and the Apps Script Explore how to use Apps Script to automate tasks in Google Sheets. Opens in new tab is insanely easy and also I've done it for you.<br>1:11 So you can get this spreadsheet Get insights into working with spreadsheets in Google Sheets. Opens in new tab down below as a BetterSheet member. You are more than welcome to get this Apps Script Explore how to use Apps Script to automate tasks in Google Sheets. Opens in new tab and I will show you right now.<br>1:18 So go up to Extensions, Apps Script Explore how to use Apps Script to automate tasks in Google Sheets. Opens in new tab . Let's see what this Apps Script Explore how to use Apps Script to automate tasks in Google Sheets. Opens in new tab looks like and let's see what it does.<br>1:23 So uhm I have some selected stuff. I have selected some of these checkboxes.
I have this checkbox Learn about checkboxes in Google Sheets and how to manage them effectively. Opens in new tab menu that is brand new custom menu Find out how to create custom menus in Google Sheets for better functionality. Opens in new tab and I click uncheck and it will run the script and it will uncheck all.<br>1:36 All of these specific checkboxes. So it won't uhm go outside the range Learn about defining ranges in Google Sheets for various operations. Opens in new tab if you have like something here. Let's see this not uncheck these ones on the right.<br>1:48 Good. Cool. So it will only check. Uncheck the ones you want.
And again, the reason we're doing this in Apps Script Explore how to use Apps Script to automate tasks in Google Sheets. Opens in new tab is because we want to trigger Understand how to set up triggers in Google Sheets for automation. Opens in new tab this, schedule this via triggers, which I'll show you, uhm, daily, weekly, or maybe we are not the ones that are using this, we are on making a template Explore how to create templates in Google Sheets for repeated use. Opens in new tab for<br>2:09 someone else to fill out and you want a fresh unchecked list every single day or every single hour. Okay, you can do that and I will show you.<br>2:16 So, the first thing we do is we write a function Get to know functions in Google Sheets and how to use them effectively. Opens in new tab uncheck. We just name this. This is literally any name you want.<br>2:23 You can call it uncheckout. You can You can call it checkbox Learn about checkboxes in Google Sheets and how to manage them effectively. Opens in new tab thingy.
Anything you want but it'll be important that you know what you're naming it.<br>2:31 So, we're calling it, we're gonna call it uncheck. We're getting a variable sheet equals spreadsheetapp Learn about the SpreadsheetApp service in Google Apps Script. Opens in new tab .getactivespreadsheet. This is just getting the entire file.<br>2:38 That's all, uhm, like the whole thing. File. Then we want the actual sheet we're working on. So, in this case, it's sheet one.<br>2:45 So we say variable sheet one equals sheet this spreadsheet Get insights into working with spreadsheets in Google Sheets. Opens in new tab file sheet.getsheetbyname, sheet one.
Then, we take the sheet one and we get the checkboxes, which we're only gonna get if very specific range Learn about defining ranges in Google Sheets for various operations. Opens in new tab .<br>2:57 We're getting checkboxes equals, or sorry, variable checkboxes equals sheet one. getrange Discover how to use getRange to access specific cells in Google Sheets. Opens in new tab b2 colon b11. This is the range Learn about defining ranges in Google Sheets for various operations. Opens in new tab that we want to uncheck.<br>3:07 And literally, all we have to do is this one line. Checkboxes dot uncheck. Just uncheck is a built-in function Get to know functions in Google Sheets and how to use them effectively. Opens in new tab here in JavaScript and in Apps Script Explore how to use Apps Script to automate tasks in Google Sheets. Opens in new tab here.<br>3:18 And now you're wondering, okay, how did I get this checkbox Learn about checkboxes in Google Sheets and how to manage them effectively. Opens in new tab menu?
And all it is, is called function Get to know functions in Google Sheets and how to use them effectively. Opens in new tab on open variable ui equals spreadsheet Get insights into working with spreadsheets in Google Sheets. Opens in new tab app dot get ui.<br>3:27 This is copied from Google Doc Helps. If you, if you Google like custom menu Find out how to create custom menus in Google Sheets for better functionality. Opens in new tab on open Google Sheets, you'll get this.<br>3:36 And I just deleted a whole bunch of other stuff we didn't need, but added ui dot create menu. Here's the name of the menu, literally checkbox Learn about checkboxes in Google Sheets and how to manage them effectively. Opens in new tab menu.<br>3:44 Checkbox Learn about checkboxes in Google Sheets and how to manage them effectively. Opens in new tab menu up here, and then dot add item, uncheck, uncheck.
So the name uncheck with a capital U is what is going to appear here.<br>3:55 And what is the function Get to know functions in Google Sheets and how to use them effectively. Opens in new tab that's going to happen when you click it is going to be the second part. So.<br>4:01 Uncheck here, and then dot add to UI. Make sure you have these all capitalized. If you've never used Apps Script Explore how to use Apps Script to automate tasks in Google Sheets. Opens in new tab before, make sure to take Spreadsheet Get insights into working with spreadsheets in Google Sheets. Opens in new tab Automation 101 here on BetterSheets.<br>4:10 And ah, this is a really fun, I think, uhm, way to uncheck things. Really interesting to, to create those templates.<br>4:19 But here's how you create the triggers. So we have our function Get to know functions in Google Sheets and how to use them effectively. Opens in new tab uncheck already.
We don't need the on open anymore.<br>4:25 The on open will only create this menu up here. But this function Get to know functions in Google Sheets and how to use them effectively. Opens in new tab uncheck, we want to uncheck this, let's say, every day.<br>4:32 At 2 a.m., right? Sometime when we're not working. Go over to the left side, click triggers. I'm gonna move my face up a little bit because we got a button to click down here.<br>4:42 Add trigger Understand how to set up triggers in Google Sheets for automation. Opens in new tab on the bottom right. We're gonna choose which function Get to know functions in Google Sheets and how to use them effectively. Opens in new tab , if you have other functions Understand the different functions available in Google Sheets. Opens in new tab , you'll have available.
All the functions Understand the different functions available in Google Sheets. Opens in new tab here, we're just gonna use uncheck, the one that we named uncheck.<br>4:52 If you named it something else, like uncheck everything, select that one. Down here at select event source, we, we actually don't need to change the deployment at all.<br>5:01 Head, actually, I don't even think there's any other options. Select event source is what we're gonna have to change. We're gonna have to change this to time driven, and then once we do that, we get some other options.<br>5:11 And I'm gonna do day timer. That means every single day, this is gonna be triggered, but at what time?
I like to do it between 2 to 3 a.m.<br>5:19 When I'm not working. If you're working late at night, maybe you want to do it early in the morning, like 5 or 6 a.m.<br>5:24 If you work in the afternoon, maybe you do want to make it like 8 or 9 a.m. Or 7 a.m.<br>5:30 Or an hour before you do it. You're gonna have to select an hour range Learn about defining ranges in Google Sheets for various operations. Opens in new tab . What this means if you've never used a trigger Understand how to set up triggers in Google Sheets for automation. Opens in new tab .<br>5:36 Before is that the very first time this triggers, when we hit save, it will choose a random time between 2 a.m.<br>5:44 And 3 a.m. And then, henceforth, after that, it'll be every 24 hours.
So it'll do the same time, but the first time it does, it'll be a random time in that.<br>5:52 Hour. That's just how Google manages their computer load, I guess. And now, once we hit that save, we have our function Get to know functions in Google Sheets and how to use them effectively. Opens in new tab and our trigger Understand how to set up triggers in Google Sheets for automation. Opens in new tab and it'll run constantly.<br>6:05 If we make any changes whatsoever to this uncheck, it will run whatever the changes we've made. So if we have a different range Learn about defining ranges in Google Sheets for various operations. Opens in new tab here, it'll do that different range Learn about defining ranges in Google Sheets for various operations. Opens in new tab .<br>6:16 It's not like saving it forever.
Something else you might want to know, just in case you like don't want this to uncheck every day, click over here on uhm the three dots and click delete trigger Understand how to set up triggers in Google Sheets for automation. Opens in new tab .<br>6:29 You can also edit this if you want. Click here and you have the ability to edit it if you need to change the time at all.<br>6:37 Okay. But I want, I'm going to delete it right now. And you'll see, delete forever.
Another thing about triggers, if you've never used triggers before, is that if you create a trigger Understand how to set up triggers in Google Sheets for automation. Opens in new tab for someone else, the sheet itself will work even if you don't access it, but the other person will not be able to see<br>6:53 the trigger Understand how to set up triggers in Google Sheets for automation. Opens in new tab . Actually, I think that changed, that they can see the trigger Understand how to set up triggers in Google Sheets for automation. Opens in new tab , but they can't edit it.
100% they can't edit it, but used to be that you can't see anyone else's triggers, but I do believe like maybe if you're an admin or something you can see other triggers, but should not see other triggers<br>7:08 , so that's going to be an issue if you, if you create a trigger Understand how to set up triggers in Google Sheets for automation. Opens in new tab and someone else is like, I want to delete this, how do I delete this?<br>7:13 You're going to have to go and do that, but it will affect the sheet no matter what.
But yeah, I hope this was helpful, again it's some, some stuff I learn new all the time after 10 years of this, some things absolutely are new like this selecting ah everything.<br>7:28 And you're able to use the space bar to check and uncheck boxes, it's pretty darn cool. I, I just discovered that recently.<br>7:37 But yeah, I hope this Apps Script Explore how to use Apps Script to automate tasks in Google Sheets. Opens in new tab is also super helpful.
I also, literally in doing this, I, I discovered you can select an entire range Learn about defining ranges in Google Sheets for various operations. Opens in new tab and do dot uncheck.<br>7:44 It used to be, I think there's an old video on Better Sheets here, where I do the same exact thing here, but we run through a for loop to know ah, for this whole range Learn about defining ranges in Google Sheets for various operations. Opens in new tab .<br>7:52 But now you can just uncheck and check the whole range Learn about defining ranges in Google Sheets for various operations. Opens in new tab . So that's pretty cool. Hopefully, hopefully this is super helpful for you and you're using this to make your, your sheets better.</div>