Members-only tutorial
Watch the video and get the practice sheet with membership.
About this Tutorial
Video Transcript
<div> Hi, welcome back. In this video I'm gonna show you how to edit macros. I'm gonna show you how to first manage them. All I did since the last video was make a copy of the sheet. So there's a couple things that are gonna happen. One we are going to have to go through a few of the processes we went through last video because it's a brand new sheet .<br><br>And when it's a new sheet and you're dealing with macros, you have to let it authorize. As we did in the last video, Our tools, macros. We have these right now. How to Spin Content How to Assign Macros To Buttons in Google Sheets
A couple things to know when you're editing or managing them or wanna do things, if you click manage, all you can do is rename them. So insert row left, and you can set the shortcut key.<br><br>You can use number or anything like that. You can't use a letter, so insert. Column, right? Oh, this is insert call left. So we can update those we can go to macros. We can here, we can record them, can manage them, or we can use them. How To Add Columns in Google Sheets How To Insert Row Under Header Automatically
And when we try to use one, and again, this is a brand new sheet , so it's gonna go through the very first thing we have to deal with from the last sheet we did this.<br><br>So it's gonna look like this. Authorization required continue.<br><br>It's gonna be our Google name, so we're gonna choose our account. We're gonna let it authorize again. This is something we did in the last one, and we're only doing this again because it's a brand new sheet with the same. Okay, so our macros ran. You can see that cuz this column here was nine. Build A Business: PR Agency in a Google Sheet Automatic Certificate Creation in Google Sheets
Now it's 10.<br><br>If we do it again, command option shift two. It's running. See, it adds a column. Okay. So our macros are now running in this new one. We didn't have to rerecord them because we just literally copied the whole sheet. You can more than, you're more than welcome to try to rerecord them. But how to edit them, you have to go to the script editor , and this is what it looks like.<br><br>It's gonna load up sometimes pretty slow depending on your depending on your speed. This is what we looked at, the very first video when you did, how to edit how to write a script. Run Every Prompt in Every Cell All At Once How to Assign Macros To Buttons in Google Sheets
But now we have way more complicated scripts here and they're recorded for us with the macros. And we can actually edit these.<br><br>In this case it says function insert road to the left. And I'm gonna try to read this with you. So the variable spreadsheet is equal to spreadsheet dot get active, which means what is the spreadsheet we're on right now? Active means we're actively on it. We're working in it. Get range , activate it to mean that's the one we wanna work with.<br><br>Then get the spreadsheet again. Getting Started Coding in Apps Script Advanced Coding in Google Sheets for Programmers Automation is not Magic
So each time it does something, it has to go to the right spreadsheet and it says insert column . Before that column that we're on. Okay, so this is just the same thing again. We need to say, okay, we're in the spreadsheet , we're in the range , we're in the exact column.<br><br>Okay, now insert a column before that. Okay. And then we just say, offset . Now activate. So like we're not, we're basically moving our, where we are, where our cursor is. We're not moving that because we're inserting a column. We're moving to the right. In this case, the. And then we're moving back. How To Add Columns in Google Sheets When Urgent, Move to Top of Google Sheet What is a Spreadsheet? Anatomy of a Spreadsheet
So our cursor doesn't really move anywhere.<br><br>And that's what that this is all doing. So to edit this, so basically what we might want to do is we might want to run this say every day. So we might want to write a trigger , which we'll do in the next video. And if we do, we want, or we want to run it from, say another sheet. So let's say we have a sheet and we call it daily.<br><br>And we have this sheet, we say summary. What if we were on here and we're like, oh crap. I want to add another column here. This macro doesn't say anything about what sheet it's on, so we're gonna add that. How To Create a Stop Watch in Google Sheets Copy Date to Next Cell Automatically Insert Row Daily Automatically
So we're gonna say get spreadsheet sheet. Actually it's gonna be sheet<br><br>by name. And then we're gonna do in quotes daily. So when we run this insert row on daily, I'm gonna rename that we're gonna actually delete all this so it's a little less confusing. So all we're doing is we are going to the daily sheet and we're gonna add at c C column, add a column before that.<br><br>Okay. So we have to command save to save it. Anytime we make a change, this red thing tells us we made a change. We have to save it. Okay, and now we're gonna run into some problems. 80 Years In 1 Spreadsheet Insert Row Daily Automatically
I'm gonna show those problems to you and work through them. Let's see what happens. So we're on daily. We do, let's go back to our tools, macro .<br><br>Now we're gonna go to tools, macros, import , and we're gonna add this function insert row on daily function added.<br><br>So now we can manage our macros. We can give that one, so that's our shortcut. We can also go to tools, macros, and just run it, see if it runs and it doesn't run because it has a, it has an error . What is this error ? It says spreadsheet dot get active sheet is not a function. Getting Started Coding in Apps Script Insert Row Daily Automatically
So let me tell you what that means.<br><br>So first of all, dismiss it and then we'll go back here and we'll fi fix this. So we should have to just delete this, get active sheet because we're getting the sheet by name. We don't need to get the sheet again. So let's do, try that one more. Let's do running the script and then ran the script. So all we had to do was we got the sheet by the name so we didn't have to get the active sheet .<br><br>That's all that is what the only change I made there. And now we do that. Now let's go to summary and do it again. Getting Started Coding in Apps Script How to Prevent Delete Tab
So it's command option shift one, it's running the script, and TA now goes back. What if we, let's see. Let's do something visual to see that it's adding. If we try that again, it'll add, boom.<br><br>See those are all moving over and now we have a new row there. Okay. And we can also, let's see if we can delete this, what that does, so if I'm on the summary tab, Command option shift one. It's running the script and it all, it brings it back here. Cool. So I just did this. Run Every Prompt in Every Cell All At Once Add New Task when Task Completed
All I did was delete this activate because that activate is gonna bring us over there.<br><br>So all I did was delete that command save. And now this is gonna happen in the background. So we have seven columns here. Let's go here. Copy that and go to summary, and it's oh no, we need to add a row or column, command option shift one. It's running the script. It finished the script. Did it do it?<br><br>Yes, it did. It added. Added a column. All right, so we are now editing our macros. How To Add Columns in Google Sheets Add Columns Automatically Add New Task when Task Completed
Now you can use a macro record , a macro , anytime you wanna learn how something works in a script, record a macro and then go read it and see how that works. Edit it. And you're gonna run into some errors. You're gonna run into some problems, but you can fix those now that I walked you through it.<br><br>In the next video, we're going to do this every single day so we don't have to do it. Bye.</div> One Percent Better Every Day How to Assign Macros To Buttons in Google Sheets
Courses
Why Code in Google Sheets? - Learn to Code in Google Sheets Part 1
Tips to Navigating Thousands of Lines of Code In Apps Script
How to Write a Function - Learn to Code in Google Sheets Part 2
From Sheet to Script And Back Again - Learn to Code In Google Sheets Part 3
Copy That, From One Sheet to Another - Learn to Code in Google Sheets Part 4
Now Do It Every Damn Day - Learn to Code in Google Sheets Part 5
Wrap Your Mind Around This - Learn to Code in Google Sheets Part 6
Write Your First Script
00:08:31
How to Record Macros
00:06:20
How to Edit a Macro
00:08:22
How to Trigger Macros Daily
00:06:58
Automatically Uncheck A Daily Checklist
How do I reference a different spreadsheet in Apps Script?
Sheet Stories / Video Notes + ADDED: Email Notifications
00:00:00
ChatGPT Clone in Google Sheets Part 2
Enter Google Drive File Name Get URL
Fast FAQS
Create an Internal Google Sheets Add-on
Tweet From a Sheet
Why Different Cell References in AI Integration in Sheets?
Show Sheet Tabs Based on Edit
Add Title Case to Google Sheets
How to Power Testimonials with Google Forms and Sheets
Getting Started Coding in Apps Script
Seek Errors When Coding Apps Script
Think Like a Programmer: Develop The Mindset of an Apps Script Coder
ChatGPT Clone in Google Sheets Part 1
Embed a Number in a Website from a Google Sheet
Create Navigation Like A Book or Presentation
Add Click Tracking To Your Google Sheets | Bitly in a Google Sheet
00:29:08
Hold a Giveaway Raffle in a Google Sheet
Capture Emails from Website Form to a Google Sheet (Without Zapier)
Embed a Headline in a Website from Google Sheets
Quickstart Tutorial OpenAI API in Google Sheets
Create a new Spreadsheet from just a Name in a Sheet.
00:05:21
Bjarne Asks: Can I show the Last Time of the Last Edit in a sheet?
00:05:43
Email Yourself a Cell from a Google Sheet, Every Day
OpenSea Data Inside Sheets
Create an Email Campaign Stats Calculator
00:35:13
Twitter App Clone in a Google Sheet
Dylan Asks: How to Automatically Delete Rows If Cell Contains Value
Highlight Row as You Move Your Cell Selection
Create a Timer with Apps Script
LinkTree in a Google Sheet
00:11:22
Password Protecting Data In a Google Sheet
Automatic Weekly Backup of Google Sheets
Create a CPM Custom Function (Create Better Calculators!)
Move Entire Row when a Cell is changed to "Yes" - The $75,000 Google Script
00:12:29
What Can You Automate in Google Sheets? Every single trigger available to Google Sheet users
Sync Two Tabs Without ImportRange()
Google Sheets Stories? No! But we'll add timestamped video notes to your google sheets.
00:00:00
Password Protecting Data In a Google Sheet Part 2 The Basics
Benoit Asks: How to Convert Case
00:07:35
Learn to Code in Google Sheets, For Programmers
How To Improve: 1,000 Business ideas: Business Idea Generator
00:11:20
Add a Checkbox to Turn on Dark Mode
00:05:10
Write Your First Script
00:08:31
Find Keywords in Any Column. Create quick search dropdown to find keywords
00:09:37
Basic CRM - Add a Powerful Script To Move Row Based on Status
Let's Make a Bookmarklet!
00:12:37
Troubleshooting Bitly in a Google Sheet Script
00:07:07
Unique Features - Design a Better Dashboard Part 2
00:04:13
How To Set Up Stripe Webhook to Google Sheets with Google Script
00:22:10
How to Edit a Macro
00:08:22
Sheet Stories / Video Notes + Clear 24 Hour Old Videos
00:35:10
Add A Timestamp to Task Lists (without Now Formula)
00:07:44
Make your Custom Functions Like Native Functions | Custom Function Autocomplete
00:17:58
Create a Changelog Between 2 Cells Custom Function | To learn Double For Loop
00:23:26
New Syntax for WhatChanged Formula in Google Script
00:07:14
How to Record Macros
00:06:20
5 Ways to Create Coupon Codes | Create UUIDs
2 Ways to Delete Lines Quickly (CAREFUL, it's a script!)
00:09:53
Deep Inside Dark Habits Google Script
00:18:54
How to Trigger Macros Daily
00:06:58
Create a Radio Button From Checkboxes Using Google Apps Script
00:15:01