HomeGoogle DocsSpreadsheetHow to Record and Run Macros in Google Sheets

How to Record and Run Macros in Google Sheets

Published on

Now you can record and run Macros in Google Sheets! Google has recently introduced two long-awaited features in Google Sheets. They are Macros and Row / Column Grouping. Google is rolling out these features to users globally.

I’ve already posted the tips related to grouping of rows and columns in Google Sheets. Now in this tutorial, I am going to explain to you how to record and run Macros in Google Sheets. Honestly, I’m also thrilled like you to experiment this new feature.

How to Record and Run Macros in Google Sheets

The Macros in Google Spreadsheets help us to automate tasks. You can speed up some of your data entry requirements with Macros. If you want to perform repeated tasks, you can record your such tasks with Macros. Then with keyboard shortcuts, you can repeat your recorded tasks in your Spreadsheet. Let’s see how to record and run Macros in Google Sheets.

How to Record Macro in Google Sheets

You can record a Macro by going to the Tools menu Macros.

Macro in Google Sheets Tool Menu

Here I am going to create my first ever Macro in Google Sheets. But there are two important things related to Macro that you should know before recording your first Macro. What are they?

First, when you click the Record Macro button in Google Sheets, you can see two options as below.

1. Use absolute references:

I don’t recommend this as you can apply the recorded Macro only in the recorded cell.

2. Use relative references:

In this, you can apply a recorded Macro to your active cell. I recommend this method.

Here I am recording a sample Macro in my Google Sheets. Please note that I am following the relative reference method, that I’ve just mentioned above, here.

My Active Cell is Cell A1.

Steps to Record Google Sheets Macro:

1. Go to the menu Tools > Macros > Record Macro.

2. Click on “Use relative reference”.

3. The Macro started recording my task!

In Cell A1 I am going to type the word Info Inspired, then Bold it and change the font size to 20. Then I’ll click the Save button.

4. I’ve done the above steps and greeted with a message saying “Save new macro”. You can give any suitable name here. I’m naming my first ever Macro in Google Sheets as “Title”. Optionally you can set Shortcut to the Macro. I put the number 9 and my Macro Shortcut in Google sheets will be Ctrl+Alt+Shift+9.

Google Sheets: assign shortcut to macro and name it

Now let’s see how to Run Macro in Google Sheets. You can do it from the tools menu itself or you can use the assigned shortcut key. Below are the steps.

How to Run Macro in Google Sheets

As I have selected relative reference while recording Macro, I can run it on any cell. Here to run the Macro I’ve just selected cell A10 as my active cell.

I’m using the shortcut Ctrl+Alt+Shift+9. Once I’ve applied the shortcut, I could see the message “Running script” on my Google Sheets and that followed by the below message.

authorise your Google Sheets to Run Macro

Click Continue and choose the account that is connected with your Google Sheets and complete the process.

That’s all. The Macro got applied in my Cell A10. I mean the text Info Inspired in Bold style and font size in 20!

You have learned how to record and run Macros in Google Sheets. Now I know you have definitely had the following questions in your mind.

Record and Run Macros in Google Sheets – Q & A

Question: Does the recorded Macro in Google Sheets globally available, I mean in all my Google Sheets files?

Answer: Nope! It’s only available in the recorded Google Sheets file. It’s not a global setting. But it can be used in any sheet tabs in the recorded file.

Question: How to edit the recorded Macros in Google Sheets?

Answer: You can edit Google Sheets Macros from the menu Tools > Macros > Manage Macros. You can see the below options there.

1. Edit Macro Titles.

2. Edit Assigned Macro Shortcut.

3. Edit Script.

4. Remove Macro.

You can edit the Script if you know Google Apps Script. Otherwise better remove the recorded Macro and create a new one.

That’s all about the record and run Macros in Google Sheets. If I find something interesting with Google Sheets Macro, other than the one mentioned above, definitely I’ll update you with a new tutorial. Enjoy!

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

Running Total By Month in Excel

This tutorial demonstrates how to calculate the running total by month in a range...

SORT and SORTBY – Excel Vs Google Sheets

While Excel offers the SORT and SORTBY functions for sorting a table, Google Sheets...

Get Top N Values Using Excel’s FILTER Function

When using the FILTER function in Excel to extract the top N values, it's...

XLOOKUP in Excel: Working with Visible Rows in a Table

In Excel, the XLOOKUP function isn't inherently designed to exclusively work with visible rows;...

More like this

Interactive Random Task Assigner in Google Sheets

You have multiple tasks and multiple people. Here's a fun way to randomly assign...

Google Sheets Bar and Column Chart with Target Coloring

To color each data point in the column or bar chart according to the...

Analyzing Column A Between Non-Adjacent Values in Column B: Google Sheets

This tutorial addresses a common scenario encountered in Google Sheets: how to sum, average,...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.