How to Assign Macros To Buttons in Google Sheets

Learn how to assign macros to buttons in Google Sheets to streamline your workflow and enhance your spreadsheet functionality. This tutorial covers creating and linking macros for formatting headers with ease.

Here's how to assign macros to buttons. We're going to create a macro that's going to format the header , and then we're gonna also create a macro that's going to un reformat the header , and we're gonna create buttons here in the sheet. Go up to extensions, macros, record macro , and we're just gonna select that header row. We're gonna come over to the background. We're gonna give it a nice green color, and we're gonna change the text to white. We may even want to change the font to quicksand, and each action will be shown here. Let's click save. We're gonna name this macro format header. Now let's go insert a drawing. Let's pick this shape. We're gonna call it format header, and it's gonna show up here. Click the three buttons right at the top right corner of this image and a signed script format header.

In the second one, we're gonna do macros, record macro . We're going to select that header again. I'm gonna hit command slash to unformatted or remove the formatting , and we're gonna remove format , we'll call it. Let's insert another drawing . Let's change the color to red. Save and close. Click and drag it over here. And again, the three little dots in the corner. A signed script. Paste our name. If it's a spaced, two names or two words. It won't work. You need one name. Click okay. Let's format the header. We will have to authorize it the first time we run it. And we can remove that format. And there we go. We've assigned macros, two buttons, save a bunch of clicks. You are watching better sheets here on YouTube.

Make sure you check out this video or this video and subscribe right now to get more tips, tricks, how tos, get more out of your Google sheets than you ever have before. I'm excited to be making a ton more videos here. Ask me questions down in the comments and I will answer them in future videos. But for right now, right here, one of these videos is gonna be your next Google sheet.