Easiily Enter Class Scores in Google Sheets
Learn how to easily enter class scores in Google Sheets using Google Apps Script, transforming your attendance sheet into a score entry tool.
In a previous video, I created a class attendance sheet. We can take attendance today, and as we answer these yes or no questions, it will check off. Someone is present or not, but what if we wanna use this for something other than attendance, like writing down scores, maybe we have all of our papers and we were gonna do our data entry, but we want to just enter the numbers and be done. Let's edit our app script to do that instead of just checking off or not checking off a number . So what we're gonna need to do is change this alert to prompt what is somebody's score. I'm gonna delete all the other stuff, and the prompt is just gonna have a string asking question and a button set.
UI button set? Yes. No. 'cause sometimes maybe they have no score, and if the button is yes, we want something else, we want the response. Get response text, and this is gonna be variable score equals response dot get response text. And instead of getting the range and checking, we're gonna get the range and set value to the score. We're gonna save this. And one extra thing is when we created. The column we're inserting check boxes, so we don't wanna do that in this particular case. We just want a new column with the date and that's it. 'cause we're gonna have something other than check boxes here.
So let's try this out. Class menu instead of take attendance. Actually let's take, let's get scores. We will rename this as well. Get scores. Let's go try it out. So class menu. Actually, we need to save everything and refresh it so we get a new menu. Let's make sure that our column is created perfectly. Yes, we can delete this column now and get scores today. What's Andy's score 78? Yes. What's parts score 88. Ah, we did not actually write the thing, so let's go see and check this out. I think we just want an okay here, and if it's okay.
Let's see if that works. Now, get scores today, then you three. We're still not getting anything. Ah, we need to change our response to UI dot. Response Get selected button, and now we can do GET scores today. 88. There we go. 90 23. Poor Carl Dale. There we go. And now we're getting all of those. So we just needed to get the right selected button is okay, and then each of those scores is being entered. So a really cool way to insert scores and make sure we're getting the right people. Hopefully this was fun for you. I'll put this script and this sheet down below in the description below.
Hopefully you enjoyed it.