The macro is then available for use in the sheet. To create the macro and link it to the macro function. Macro functions should take no arguments and return Script bound to the sheet in the Apps Script editor. You can take functions written in Apps Script and use them as macro functions.Īlternatively, you can create macros within the Apps Script editor by You can even write macrosįrom scratch in Apps Script, or take functions you've already written and Since every recorded macro is defined entirely within Apps Script, you canĮdit them directly within the Apps Script editor. Google Sheets also automatically updates the scriptĪnd keyboard shortcut assigned to the macro. In the event that there isĪlready a project file bound to the sheet with that name, the macro function To the sheet, in a file titled macros.gs. The macroįunction is added to an Apps Script project bound When you record a macro, Google Sheets automatically creates an Apps Scriptįunction (the macro function) that replicates the macro steps. You can also activate the macro from the Google Sheets Tools > Macros You can use that shortcut to quickly execute theĮxact macro steps again, typically in a different place or on different data. Macro, you can link it to a keyboard shortcut in the formĬtrl+Alt+Shift+Number.
Specific series of UI interactions that you define.