Members-only tutorial
Watch the video and get the practice sheet with membership.
About this tutorial
Annotated transcript
28 formulas linked inline Click any highlighted terms to learn more.<div> Hello, welcome to How to Record a Macro . This is gonna be super quick, so I'm gonna fill your head with like a ton of the reasons why we do this and why this is so awesome. In the past, um, when I was learning to do Google Scripts, uh, one of the things that was really, really hard was just. How to do basic functions .<br><br>Every single thing I needed to do at a row, at a column, insert this, split this, I had to Google every single one. But Google Sheets and Google has made it incredibly easy to figure this stuff out because you can record macros. Now. How hard is it to learn Google Sheets? Advanced Coding in Google Sheets for Programmers How to Assign Macros To Buttons in Google Sheets
When I first started, this didn't exist. The learning curve was so steep, and now they flattened that learning.<br><br>and now you can learn so much really quickly by just knowing how to record macro . So one of the things that I do a lot in, in Google Sheets and we all do is like keep track of things maybe every month or every week, uh, or every day. And if, if you're tracking something every month, you have, you know, January, February, March.<br><br>and you have what you're tracking. Maybe it's follow account or it's sales or it's revenue. How hard is it to learn Google Sheets? Track Anything! In a Google Sheet How to Track Days Since Task Started in Google Sheets
Um, and, and month to month, you're literally only working one time every month. So 12 times a year you're coming in here and, and doing this, but sometimes you're doing it 52 times a year, right? Every week or 250 times.<br><br>If you have to do five days a week, um, if you're doing, if you're. adding like together revenue every day.
Uh, you have to literally seven days a week, maybe some of those days you have to do three times, and then the other day you do once, you know, we end up going 25 more times into this document if we're doing this daily, uh, per year.<br><br>So here's something that happens is right, we go to the far left and we know every single Google shoot we ever start has 26 rows, right? It goes to. and it has a thousand rows, right? But sometimes we don't need those thousand rows. We need like 200 columns. When did you learn the secrets of Google Sheets? | Sheet Talking Episode 8 Esa VIBE CODE GOOGLE SHEETS
And so when you're adding a column, and this is what we're gonna do, we're gonna add columns today, and this is gonna show you how to record a macro .<br><br>Um, you c you go up here, you, you, uh, can delete columns, right? You can insert one to the right if you, uh, highlight every. What is that? Six columns you can insert six to the right. So what? What happens is like you're end up like, oh, I know I have to get a column for every day of the year. Oh, I go over here and like this takes a long time.<br><br>I have to like insert 22 and then I have to count, you know, time and time again. How To Add Columns in Google Sheets Add Columns Automatically How to Add Multiple Columns with Apps Script
Here we can even see all, we can look at the column number , right? Sometimes we have to do the math, right? We have to be like, okay, az, how many, how many columns are in az? But actually, if you do column, this is like a super easy to way to count the columns.<br><br>Uh, you can tell, okay, this is column two. So if we know, oh, we have. Today, maybe today's data , and then we have column three, but we really want that to be one. Okay, so let's do minus two. So we now have one, and then we have 25 columns. Here we need 365. So how would we do that? Right? Build The Dashboard - Design a Better Dashboard Part 3 Beginners Make This Spreadsheet Mistake All The Time! Count Color by Row
We would insert right, insert, right?<br><br>Oh my God, it's this taking forever. Here's how you record a macro . You go up to tools, macro . Record macro click. Now we're already recording the macro , so all I'm gonna do is go click. I'm gonna insert one to the left. That's just what we're doing right now, and that's it. Safe. Let's say insert row . Now we can even create a shortcut if we want to make that a keyboard shortcut .<br><br>Um, we can do that. Let's do that. Insert row to left. Save. So now all I'm gonna do is, hold on. I'm gonna do command option shift one, and now it's running. How To Add Columns in Google Sheets How to Assign Macros To Buttons in Google Sheets
Oh, this is what you're gonna have to run into every single time you create a document with a script attached. You just have to get it to, for permission to run every each start at the beginning.<br><br>So you'll do that once, run into this, click that, and then yes, I want to allow. and now sh command option shift one, and it's running the script. Then it'll say Finish script. Okay, let's do that again.<br><br>And every time we do that, we're adding a row. We know that because these column numbers are going up, right? What's really cool too, is we can manage them. Run Every Prompt in Every Cell All At Once How To Insert Row Under Header Automatically
So in the next video I'm gonna show you how to edit this. Um, but I just wanted to get that really quick to you. You can even do one to the right. So you can go up to tools, macros, record , macro insert Right.<br><br>Save, insert column to right. Two, safe. Now we have a nifty little keyboard shortcut to the left. One to the left, and one to the right. One to the right. And see each one is adding. We can go here. Um, here's one thing. If you are using this macro to add like hundreds of columns, what I would suggest first.<br><br>And this is a pitfall you're gonna run to. How To Add Columns in Google Sheets How to Add Multiple Columns with Apps Script
Your sheet will slow down incredibly because it has a thousand rows. Many times when we're, we're taking, you know, daily data , we're not, we don't need a thousand rows, uh, a thousand rows. So what I would do is delete that, delete all those, and now we can add a bunch of rows.<br><br>And in the next video I'm gonna show you how to edit macros. Uh, and it's gonna be really, really cool cuz we're gonna be adding like, not a thousand, but like 10 columns at a time or a hundred columns at a time. It's gonna make our job like so much faster, bite.</div> 80 Years In 1 Spreadsheet What is a Spreadsheet? Anatomy of a Spreadsheet