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.
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.
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.
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!