VIBE CODE GOOGLE SHEETS
In this video, learn how to automate repetitive tasks in Google Sheets using formulas and App Script, specifically for crochet pattern creation. Discover tips on using functions like REPT and SEQUENCE to streamline your workflow.
We're crocheting, actually we're not, but Becky is over at, I love Google Sheets Facebook group . She was asking this in the group . It's just, I love Google Sheets. If you want to join, go ahead and join this Facebook group . We just, people ask questions, people answer questions. We share some really cool Google sheets. We've made anything really interesting or that's interesting to us. But for this, I was super interested in it because I found a way to sort of do this for Becky with a formula . And then I'm gonna try Chacha PT to see what Chacha PT comes up with.
I'm gonna do one row 'cause it's gonna go all the way across, I imagine, like straight across to the right. And how many columns? 140. And we're gonna start and what are we gonna start? Well, this is like a sequence of numbers. We can say start one, step one, and we can say, okay, there are 1, 2, 3, 4, and we can see all the way to the end, 140.
Now what this actually en enables us to do is type in white and now if I double click on the blue dot, it's going to go down. Yeah. But if I go here to the right, I can drag that all the way across. That's not gonna help very much either. Right. I could do a formula maybe, but I could also transpose this. I could do something like 140 rows, one column, start one, and go to one.
Let's just delete all of that. And we have REPT. Repeat, what's the text? White, how many times? 140. And that gives us literally the word white repeated, but I can also do white. Comma. And then I can do split this text by Delimiter comma.
And we have 140 spots. Exactly right. So this repeat or rep can really help us write it individually in this formula . But I wonder if there's also a way that we could just enter literally this kind of words like repeat X number of times.
Do this for any. Any input I do for colors, so it will be X number and Y color and any combination.
And what I know is in our app script , in extension's app script , there are two things that I know.
Text they want text, they want, and this is just commenting and saying, Hey, this is gonna ask for a user input. We can do variable UI equals spreadsheet app, docket ui.
Uh, ss get active sheet . Get active range . Actually, we only need probably active range . Get row.
And what that does is right up here on the top. You see a crochet in you now and now it has this, so this is gonna make it a lot easier to test the app script .
just copy and paste inside. And this helper function . So it's good to know that functions start with the word function and they have a name and then parentheses with some, sometimes a little bit of an input.
Oh, it doesn't exist because it has an S at the end. GPT didn't catch that. But now if I double click, there it is. Enter row words.
And let's see. Gray. It did it. Exactly. So let's change up the what it needs to do. I'm gonna make up one here. 89 blue, 45 green. 55 white.
If you wanna check out my course on Udemy, I go through spreadsheet automation 1 0 1.
be your next Google sheet.