Software

How to record macros in Google Sheets

Google Sheets users have been asking for the ability to record macros for years, and Google finally delivered. Here's how to use this new feature.

Google Sheets users have been waiting for this day for a long time, and now it's finally here: Google has added macro recording to Sheets.

The new feature rolls out today and can be accessed easily to record step-by-step macros without having to learn Google's App Script language, which is what macros for Google Sheets are programmed in.

Recording macros in Google Sheets works the same way as it does in Microsoft Excel: start the recording, do whatever you want to automate, and click stop when you're done—that's it!

Step 1: Start the recording

From the menu at the top of your spreadsheet click Tools, where you should see the Macros button. In a sub menu under Macros is the Record Macro option (Figure A)—click on that.

sheets-macros-1.jpg

Figure A

Image: Google

Step 2: Recording the macro

Don't look for a record button—the process starts automatically. The only option you may need to change once the recording has begun is whether you want to use absolute or relative references (Figure B).

sheets-macros-2.jpg

Figure B

Image: Google

A macro with absolute references will only do exactly what the recording says—if you record the macro using cell A1 it will only do things to A1 when run in the future. Relative references will allow you to run the macro on other cells and from other starting points—a better option if you want something general, like adding a calculation to a row of data.

SEE: Everything as a Service: Why companies are making the switch to SaaS, IaaS, PaaS, and more (Tech Pro Research)

Every time you take an action on the spreadsheet the recording window shown in Figure B will update to indicate an action has been added. When you reach the end of your macro sequence return to the recording window at the bottom and click Save (Figure C).

sheets-macros-3.jpg

Figure C

Image: Google

Give your macro a name and assign a shortcut key if you want, click Save (Figure D), and that's it—you've recorded a macro!

sheets-macros-4.jpg

Figure D

Image: Google

Step 3: Using your new macro

The next time you need to use your Sheets macro return to the Tools -> Macros menu. Below the record macro option will be a list of the macros you've created (Figure E). Just click on the one you want to run and it will do so automatically.

sheets-macros-5.jpg

Figure E

Image: Google

Also see

About Brandon Vigliarolo

Brandon writes about apps and software for TechRepublic. He's an award-winning feature writer who previously worked as an IT professional and served as an MP in the US Army.

Editor's Picks

Free Newsletters, In your Inbox