Have you ever found yourself doing the same task over and over again in Google Sheets—like formatting cells, sorting data, or applying filters? What if you could click a button and let your sheet handle all of it for you automatically? That’s exactly what Macros in Google Sheets are designed to do.
Macros let you record your actions in Google Sheets and replay them anytime you want—without writing a single line of code. It’s a beginner-friendly way to start automating your workflows, saving you time, reducing errors, and making your spreadsheets a whole lot smarter.
What Is a Macro in Google Sheets?
A macro is a recorded set of actions that you can save and run repeatedly. When you record a macro in Google Sheets, Google is actually writing Apps Script code behind the scenes based on the actions you take—like formatting rows, adding borders, or applying filters.
This makes macros a great starting point for anyone who’s never used scripting or coding before. You do the work once, hit record, and let the macro take care of the rest in the future.
How to Record a Macro in Google Sheets
- Open your Google Sheet.
- Click on Extensions > Macros > Record Macro.
- A small panel will appear at the bottom of the screen with two options:
- Use Absolute References: Replays the macro exactly as recorded (specific cells).
- Use Relative References: Replays the macro relative to the currently selected cell.
- Perform the actions you want to automate—format cells, add filters, change colors, etc.
- Click Save and give your macro a name.
- You’re done! You can now run this macro anytime from Extensions > Macros.
Real-Life Example: Auto-Format Sales Data
Let’s say you frequently import sales data into your Google Sheet, and every time, you:
- Bold the header row
- Apply currency format to sales columns
- Add a border to the whole table
Instead of doing this every time manually, you can record a macro once, and replay it in seconds!
Sample Data:
Date | Product | Sales |
---|---|---|
2025-04-01 | Widget A | 1500 |
2025-04-02 | Widget B | 2300 |
Recording a macro to format this data means next time, with just a click, your formatting will be applied instantly—no repetition, no wasted time.
Features and Benefits of Using Macros
- No coding required – record actions by simply doing them
- Automate routine formatting and tasks
- Macros are saved within the Google Sheet – easy to access and share
- Edit the generated Apps Script if you want to go advanced
- Combine macros with other automations or scripts
How to Edit a Macro Script (Optional)
If you’re curious or want to tweak your macro, you can view and edit the script behind it:
- Go to Extensions > Apps Script
- You’ll see the macro saved as a function in the code editor
- Edit, improve, or combine it with other scripts if needed
Even if you don’t write your own code, this is a great way to learn how Google Apps Script works under the hood.
Running Your Macros
Once your macro is saved, running it is easy:
- Click Extensions > Macros
- Select the macro by name
- Watch your spreadsheet update itself like magic!
Quick Reference: Macro Tips
Tip | Description |
---|---|
Absolute vs Relative | Use Absolute when repeating the exact same cell actions. Use Relative when actions should adjust based on selected cells. |
Multiple Macros | You can create and save multiple macros in one sheet—each with a different purpose. |
Shortcut Access | Assign custom keyboard shortcuts to your macros for even faster use. |
Share-Ready | Anyone with access to the Sheet can use the macros too! |
Macros in Google Sheets are a game-changer for anyone who wants to save time and eliminate repetitive tasks. Whether you’re formatting sales reports, adjusting columns, or applying filters, recording a macro is as easy as doing it once—and never doing it again.
Start small. Record one of your everyday tasks today and see how much time you save this week. With macros, your spreadsheets will start to feel less like a chore and more like a smart assistant that gets things done for you.