Google Sheets has now added these powerful features to automate monotonous tasks. Working in spreadsheets involves recurrent tasks that can be boring and tiresome. Macros are the apt way of being productive that lets you automate the boringly monotonous tasks. Spreadsheet users who deal with multiple sheets having similar charts, functions, and data would reap benefit from the macros. Macros are the best way to save your time that would allow you to focus on your important task rather than doing the deary round of bland tasks.
What are Macros?
Macros are the programs that will allow you to automate the recurring task without the need of you writing code. Macros record your action and save them so that you can reuse them when needed with a single click of a button. Macros come in handy when you want to automate the tedious work in sheets like add formatting, inserting additional rows, inserting additional columns, formatting tables, creating charts, inserting tricky formulas, inserting functions and more. Macros in simple terms is a time-saving tool which is a trifecta of recording a repetitive task, saving the task and running the task in future whenever you want without writing any code.
Create Macros to automate tasks in Google Sheets
Launch Google Sheets by entering sheets.new in your browser URL or simply open Google Drive folder and press Shift + S to create a new Google Sheet in that folder. Type some data in any cell of the sheet. Navigate to Tools and select Macros from the drop-down menu.
Click on the Record macro from the submenu. This will open a Recording New Macro box at the bottom of your sheets. You will be asked to choose between the two options. Either User absolute references or use relative references.
Select Absolute references when you want to apply formatting techniques to the exact location as recorded. Say you want to format a range of cells A2: C1. Select the data in those range cells and make the font bold. The macros will be applied to these cells only and will always make the data in those cells range appear bold regardless of which cell you clicked. Select Relative references when you want to apply formatting to the different cells, irrespective the exact location as recorded. It applies macros based on where your cursor is rather than the exact location where the macros were recorded. This is useful when you want to insert chart, functions, or formulas on the cells you select and its nearby cells. Say if you record bolding data in cell B1, the macro can be later be used to bold cells in C1. After you select between the two choices, the google sheets will start recording. Any formatting which you want to automate in the cell, column, or row will be recorded. Make sure to plan what you want to record well in advance. Apply the formatting in any desired cell-like changing the font style, color, etc. The Macro recorded watches each of your step. Once done, click the Save button and type the name for your Macro.
You can also set a custom Short key to have quick access to your Macro. Click the Save button to create your macro. To access the Macro, Navigate to Tools, and select Macros.
Click on the Macro folder you want to run from the submenu.
Edit your Macro
You can change the name of the Macros, edit the Macro scripts, remove macros or even add the keyboard shortcut after its created. Navigate to Tools and click Macros from the drop-down menu.
Select Manage Macros from the submenu to edit your macro. To delete a macro or edit its scripts, go to More beside the options Macros and click Update.
Import other macros
Google Sheets allow you to import any custom functions created using Google Apps script file to the Macro menu. On your Google Sheets, navigate to Tools. Select the options Macros from the drop the menu. Click the option Import from the submenu. Click Add function button next to the function you want to import. That’s all there is to it. I hope you find the post useful.