Members-only tutorial
Watch the video and get the practice sheet with membership.
About this Tutorial
Sheet Resources
Apps Script APIs used
Video Transcript
<div>00:00 So I'm creating a community sort Learn how to sort data effectively in Google Sheets for better organization. Opens in new tab of sheet for my community, a Google sheet for my community, where Understand how to filter data using the query where clause in Sheets. Opens in new tab I'm going to be organizing Americano tournaments.<br>00:09 These are tournaments where Understand how to filter data using the query where clause in Sheets. Opens in new tab eight people play and have seven matches. We have to play with each individual other player and against every other player twice.<br>00:18 So once with everyone and twice against everyone.
And there are apps that do this, but one weird thing that I wanted to do was as these tournaments unfolded like once a week, I wanted to capture the score each time.<br>00:33 And so capturing the score actually, I was like, oh, let's just do it in a Google sheet and I have all the name and the score, I'm going to use unique Discover how to extract unique values from a dataset in Google Sheets. Opens in new tab .<br>00:40 To grab all the names and I'm going to sort Learn how to sort data effectively in Google Sheets for better organization. Opens in new tab with the sort Learn how to sort data effectively in Google Sheets for better organization. Opens in new tab formula Get familiar with the syntax rules for writing formulas in Google Sheets. Opens in new tab , right?
Automated scoring system, keeping track of every name here.<br>00:50 And I was like, wait, to get the scores though, I have to type the scores here from an app result.<br>00:56 So I was like, well, let me just make the tournament itself score. So this is for paddle, it's a sort Learn how to sort data effectively in Google Sheets for better organization. Opens in new tab of like a mini, not a mini tennis, it's sort Learn how to sort data effectively in Google Sheets for better organization. Opens in new tab of a different style of tennis and squash and stuff, like always played in doubles.<br>01:09 So you see court one here, court one here, round one is this player versus this player.
Now I have filled this with four different automations, one which is just formulas, two ah which is a ah custom menu Create custom menus in Google Sheets to streamline your workflow. Opens in new tab up here, three it's a button, an image Learn how to insert and manipulate images within your Google Sheets. Opens in new tab with a button here, and four I have on the settings a checkbox Utilize checkboxes in Google Sheets for interactive data management. Opens in new tab <br>01:30 that does the automation as well.
And I will explain why I do each and every one of these because ah they are all for different reasons, different people are using this kind of sheet all the time.<br>01:40 So one, I'm on my laptop, or rather a desktop computer, right, a laptop style computer, and I can do all of these.<br>01:48 Not every version of Google Sheets can do all of these automations, so I will explain which ones do which. Uhm, but first I want to walk you through the sheet, so, and the formula Get familiar with the syntax rules for writing formulas in Google Sheets. Opens in new tab automation.<br>02:00 And this, you might not think is automation, but is pretty darn magical in Sheets.
So I have created a place where Understand how to filter data using the query where clause in Sheets. Opens in new tab we create player names here, and we just add the player.<br>02:11 Just say, here's Andrew, here's Betty, here's Carl, and I don't know if you can see over on the right, Edna, Frank, Gary, and Hector.<br>02:25 But here on the right, all of these names are changing. So I do not have to copy-paste these names anywhere, I don't have to create the matchups.<br>02:31 The matchups are already created, here's Andrew and Betty, here's Andrew and Hector, here's Betty and David, they're all here.
I have quote-unquote automation.<br>02:40 I automated this with these formulas. And this is just formula Get familiar with the syntax rules for writing formulas in Google Sheets. Opens in new tab references Understand how to use cell references to link data across your spreadsheet. Opens in new tab to the cells Explore the different functionalities of cells in Google Sheets. Opens in new tab . That is it. I have created each of these rounds.<br>02:48 I did actually get a, not a random generator, but I did find an Americana generator.
I was working on this for quite a while, trying to generate these matchups myself with some JavaScript, and it just wasn't working so well.<br>03:00 So what I did is I just went onto the app, created one tournament, and then whatever format Master formatting options to enhance the appearance of your Google Sheets. Opens in new tab that was, I hardcoded each of these in.<br>03:08 And so now we can, but we can randomize this by taking this range Learn about selecting and using ranges in Google Sheets for data manipulation. Opens in new tab here and go up to data Get insights on managing and analyzing data effectively in Google Sheets. Opens in new tab and randomize range Discover how to randomize ranges in Google Sheets for varied results. Opens in new tab .<br>03:16 And now these cell references Understand how to use cell references to link data across your spreadsheet. Opens in new tab are going to stay.
But it's this range Learn about selecting and using ranges in Google Sheets for data manipulation. Opens in new tab that's going that is randomizing and you see the matchups are now different.<br>03:24 But everybody plays with everybody once and against everybody twice. So you see Edna, David Hector, and you can always double check this.<br>03:32 It's always seven rounds if it's eight players.
With nine players it is one person is resting or out each round, but it is still a number Understand number formatting options available in Google Sheets. Opens in new tab of around nine rounds in fact this time.<br>03:42 Um, but again, everybody plays with everybody once and against everybody twice, but you also rest one of the ah rounds.<br>03:50 Well, we are creating these tournaments once a week or even twice a week maybe, and I didn't want to create as many tabs as we could.<br>04:00 We knew we would have, we would just create them on the fly, and that's where Understand how to filter data using the query where clause in Sheets. Opens in new tab the automation comes in really handily.<br>04:05 I added an image Learn how to insert and manipulate images within your Google Sheets. Opens in new tab where Understand how to filter data using the query where clause in Sheets. Opens in new tab I inserted image Learn how to insert and manipulate images within your Google Sheets. Opens in new tab over cells Explore the different functionalities of cells in Google Sheets. Opens in new tab , and I just drew this, I actually created this from two shapes, a circle and a plus sign to have this thing.<br>04:16 And in my Apps Script Explore how to use Apps Script to automate tasks in Google Sheets. Opens in new tab , I have already created ready new tournament eight, which takes today's date, and it creates a copy of the eight template Learn how to create and use templates for consistent spreadsheet design. Opens in new tab eight and adds new and then the date, so that we always have the date automatically there.<br>04:33 That function also is in this menu, actually I just added it two more, so let's refresh.
And when it opens, it will be new.<br>04:44 So, first I created this on open menu here, but this on open menu does not show up on mobile, and these images do show up on mobile, but these images do not have the assigned script and you actually can't click up an image Learn how to insert and manipulate images within your Google Sheets. Opens in new tab , but if you say option, actually command, And, and just assign script here, you<br>05:02 can actually see it happening, we hit command, and then hit assign script, it's new tournament 8.
So, it's gonna run that function Get to know various functions available in Google Sheets for calculations. Opens in new tab anytime it's clicked, and it's clicked and it did it right here.<br>05:15 But, this image Learn how to insert and manipulate images within your Google Sheets. Opens in new tab shows up in mobile, but the button is not clicked. Clickable, so what is a clickable button to run an automation?<br>05:23 So, already we've automated the uh rounds, we can randomize these rows, but now we create a new tournament. On mobile, we may have to duplicate Find out how to duplicate sheets and data within Google Sheets. Opens in new tab this, or uhm you know do those things.<br>05:40 Those steps by hand, rename it, put in the date, but uh we don't really want to.
We want to have an automation that just does it for us.<br>05:48 So what I did, is I created a settings page that has a checkbox Utilize checkboxes in Google Sheets for interactive data management. Opens in new tab , and now a checkbox Utilize checkboxes in Google Sheets for interactive data management. Opens in new tab is checkable on mobile.<br>05:57 And so, someone who wants to create a tem- uh copy of the template Learn how to create and use templates for consistent spreadsheet design. Opens in new tab , and run this 8-player tournament, they can go to this checkbox Utilize checkboxes in Google Sheets for interactive data management. Opens in new tab , it checks, it will duplicate Find out how to duplicate sheets and data within Google Sheets. Opens in new tab the template Learn how to create and use templates for consistent spreadsheet design. Opens in new tab , rename it, and it will uncheck the box.<br>06:15 So we can look at our Apps Script Explore how to use Apps Script to automate tasks in Google Sheets. Opens in new tab again and see that. It's name already, this new, uh it will not, uh rename it.<br>06:46 But we can also, you can see, let's uh delete it or rename it.
If we rename it, it will happen.<br>06:54 But how this works is we use if statements to sort Learn how to sort data effectively in Google Sheets for better organization. Opens in new tab of gatekeep to sort Learn how to sort data effectively in Google Sheets for better organization. Opens in new tab of say, hey, if the active range Understand the concept of active range in Google Sheets for dynamic data. Opens in new tab is B2, meaning the, the, the checkbox Utilize checkboxes in Google Sheets for interactive data management. Opens in new tab we're checking, if it's B2 on the settings page, making sure the sheet spreadsheet Explore the features and functionalities of Google Sheets as a whole. Opens in new tab dot app dot get active sheet Learn about the active sheet concept and its importance in Google Sheets. Opens in new tab dot get name is equal to settings, if it is, and<br>07:16 B2, then do this, which is going to be copy the input. Template Learn how to create and use templates for consistent spreadsheet design. Opens in new tab eight, and then also uncheck the value here.<br>07:23 Active range Understand the concept of active range in Google Sheets for dynamic data. Opens in new tab . If it's B4, we're going to actually create template nine.
We're going to duplicate Find out how to duplicate sheets and data within Google Sheets. Opens in new tab template Learn how to create and use templates for consistent spreadsheet design. Opens in new tab nine, and then again, set value to false, so we're unchecking it.<br>07:33 This also is, you can do uncheck here. Think that'll work as well. Uncheck. So let's double check that the uncheck works.<br>07:46 It will create our copy, and uncheck it. Yep, and then say this was actually, you know, a week ago, or on the 15th, and now we're going to create a nine one, nine player one.<br>07:58 We click the button, it will create the copy, and rename it, and uncheck it. So we can use uncheck as well, or set value to false.<br>08:04 Either one works.
If you are a BetterSheets member watching this on BetterSheets, down below is this exact sheet with all of these functions Dive into the various functions you can use to enhance your Google Sheets. Opens in new tab , all the Apps Script Explore how to use Apps Script to automate tasks in Google Sheets. Opens in new tab waiting for you.<br>08:16 You can use this. It's really cool. Uh, I will walk through. One of these, let's say we have scores, just put the scores over here.<br>08:24 Maybe you have a scores out of 16, so it's like 12, 12, 4, 4, 12, 12, and 4, and 4, or 10, 6, sorry, 10.<br>08:36 You have to put the score for each individual person. It's just the way that I set it up.
So, it's a bit of doubling, but as you can see, as I type it, the leaderboard is um automatically sorted, right, and these scores are automatically calculated.<br>08:52 So, if we get to the end of the tournament, let's just put these randomly here, we see, oh, Gary wins.<br>09:00 So, let's see, can Gary, let's give him a little different score, there we go, by one point.
Gary wins by one point.<br>09:10 Uh, now, we can take either the leaderboard or this one, doesn't matter the order, and put it in monthly, just copy paste values Master the paste values function to maintain data integrity in Sheets. Opens in new tab , and now we automatically, these are, uh, if it's different people or it's the same folks each time, you can put their scores each time, and it will automatically sort Learn how to sort data effectively in Google Sheets for better organization. Opens in new tab , find<br>09:32 all the unique Discover how to extract unique values from a dataset in Google Sheets. Opens in new tab players, and then automatically sort Learn how to sort data effectively in Google Sheets for better organization. Opens in new tab them.
So, a lot of cool automations in this sheet, makes it super easy to use, again, I made it very easy very clear to be used on desktop, laptop, and mobile, maybe on iPad as well, if you can click the image Learn how to insert and manipulate images within your Google Sheets. Opens in new tab buttons, great, if you can't click the <br>09:50 image Learn how to insert and manipulate images within your Google Sheets. Opens in new tab buttons, we got you, we got you on the settings, we can create a new template Learn how to create and use templates for consistent spreadsheet design. Opens in new tab , we can copy this template Learn how to create and use templates for consistent spreadsheet design. Opens in new tab just by checking the box, that's really cool, and I hope you enjoyed this video.<br>10:00 This Americana tournament with four automations.</div>