Google Sheets lets you automate repetitive tasks with macros. You can then bind them to keyboard shortcuts for quick execution. You're using Google Apps Script to track your actions for later use.
RELATED: Learn how to use Excel macros to automate boring tasks
What are macros?
A macro or macro command is a specific sequence of actions that you can use to automate a series of steps to increase productivity. Record your actions and save them in a file attached to the spreadsheet. in which they were recorded.
When you record a macro in Google Sheets, it automatically creates an Apps script with all the code to replicate your actions. This means that you can create complex macros without knowing how code is written. The next time you run it, Sheets does everything you did when you took the macro. In essence, Google Sheets teaches you how to edit a document to your liking with a single command.
RELATED: How to Load Google Apps with the Script Editor
Macros are a powerful feature that can basically do everything that sheets can do. Here are some examples of functionality:
- Apply formatting and styles.
- Create completely new spreadsheets.
- Use any Google Sheets feature, toolbar, menu, or feature.
The sky is the limit
Recording a macro in Google Sheets
Start a Google Sheet and click Tools> Macros> Record Macro.
After you have captured all the actions for this macro, click Save.
Enter a name for your macro. With Google, you can also create shortcuts for up to ten macros. If you want to bind a macro to a keyboard shortcut, enter a number between 0 and 9 in the appropriate field. When you're done, click "Save."
RELATED: How to Insert a Google Spreadsheet in Google Docs
If If you need to change the name or shortcut of your macro, you can edit a macro by clicking Tools> Macros> Manage Macros.
In the window that opens, make the desired settings and click" Refresh. "
The next time you press the keyboard shortcut associated with the macro, it will run without having to open the macro menu from the toolbar.
Running a Macr in Google Sheets
If If your macro is an absolute reference, you can run the macro by pressing the keyboard shortcut or by going to Tools> Macros> Your Macro and clicking the appropriate option.