You can save time by automating repetitive tasks with macros.
Create a macro
- On your computer, open a spreadsheet at sheets.google.com.
- At the top, click Extensions Macros Record macro.
- At the bottom, choose which type of cell reference you want your macro to use:
- Use absolute references: The macro will do tasks on the exact cell you record. For example, if you bold cell A1, the macro will only ever bold cell A1 regardless of which cell you clicked.
- Use relative references: The macro will do tasks on the cell you select and its nearby cells. For example, if you record bolding cells A1 and B1, the macro can later be used to bold cells C1 and D1.
- Complete the task you want to record. When you’re done, click Save.
- Name the macro, create a custom shortcut, and click Save.
- Note: When you create a macro in Google Sheets, an Apps Script is created. To edit this Apps Script, at the top, click Tools Script editor.
To perform a macro, click Extensions Macros the macro you want.
Edit your macro
You can change the name, add a keyboard shortcut, edit the script, or remove a macro.
- On your computer, open a spreadsheet at sheets.google.com.
- At the top, click Extensions Macros Manage macros.
- Make your changes. To remove a macro or edit the script, next to a macro, click More .
- Click Update.
Schedule your macro
You can set your macro to run based on actions, calendar updates, time intervals, or a chosen time and date.
- On your computer, open a spreadsheet at sheets.google.com.
- Click Tools Script editor.
- At the top, click Edit Current project's triggers.
- At the bottom right, click Add trigger and select your options.
- Click Save.
Import custom functions
You can import custom functions made with Google Apps script.
- On your computer, open a spreadsheet at sheets.google.com.
- At the top, click Extensions Macros Import macro.
- Next to the function you want to import, click Add function.