# How to Automate Google Sheets: Macros, Scripts and AI *How-to — 2026-10-29 — by Mahmoud Zalt* Record a macro, schedule an Apps Script trigger, or hand the whole task off. What each option really does in Google Sheets, and where each one stops. **Short answer.** **Google Sheets gives you three levels: record a macro from Extensions, Macros, Record macro for steps that never change, add an Apps Script trigger when something should run on a timer or on an edit, and use AI when each row needs a small judgement.** Most people jump straight to the script and end up maintaining code for a job a recorded macro would have covered. **About this guide.** This guide is based on publicly available information and Google's own documentation, checked on 17 August 2026. Sistava is not affiliated with Google. Menu names, quotas and feature behaviour change often, so confirm the current steps in Google's documentation before you rely on them. Google Sheets is unusually good at hiding its automation. The formulas are obvious, the sharing is obvious, and then there is a whole scripting platform sitting behind a menu most people have never opened. So the same repetitive job gets done by hand for years. This guide walks the three levels in order of effort. Start at the top and only move down when the level above genuinely cannot do it. That order will save you more time than any single technique here. ## How do you record a macro in Google Sheets? Open Extensions, then Macros, then Record macro. Google's help page then asks you to choose between absolute references, where the macro does tasks on the exact cell you recorded, and relative references, where it does tasks on the cell you select and its nearby cells. Do your task, click Save, name it, and you can add a custom shortcut. That absolute versus relative choice is the one people get wrong. Absolute is right when the macro must always touch the same cells, such as clearing a fixed summary block. Relative is right when you want to run the same treatment wherever your cursor happens to be. Afterwards you run it from Extensions, Macros, and pick your macro. Google documents a Manage macros screen in the same menu for editing names, adding keyboard shortcuts, changing the underlying script or removing macros, and an Import macro option for bringing in custom functions. **A macro is deterministic, and that is the point.** It replays your recorded steps exactly, in the same order, whatever it finds in the sheet. That makes it perfectly repeatable and completely unable to notice that this month's file has an extra column. Match the tool to whether the steps can vary, and you will avoid most automation regret. ## When should you move up to Apps Script? When something has to happen without you opening the file. That is what triggers do. Google documents installable triggers that fire on a timer, when a spreadsheet is opened, when a value is edited, when the structure changes, when a form is submitted, and on calendar events. Time-driven triggers are the workhorse. Google's documentation says they can run as frequently as every minute or as infrequently as once per month, which covers almost every recurring spreadsheet job people actually have. | Trigger | Fires when | Typical use | |---|---|---| | Time-driven | On a schedule you set | Refresh a summary tab every morning | | On open | Someone opens a file they can edit | Rebuild a view or show a prompt | | On edit | A value in the spreadsheet changes | Stamp who changed a row and when | | On change | The structure changes, such as a sheet or column | Notice when someone reshapes the file | | On form submit | A form response arrives | Route a new response to the right tab | | Calendar event | An event is created, edited or deleted | Keep a schedule tab in step | Google also documents restrictions that explain a lot of confused debugging. Installable triggers do not run if a file is opened in read-only view or comment mode. Script executions and API requests cannot fire them. And they always run under the account of the person who created them, whoever actually triggered the event. **The account rule catches teams out.** Because a trigger always runs as the person who created it, a script that reads a private file will keep working for them and quietly fail for everyone else. When the person who built it changes role or loses access, the automation goes with them. Write down who owns each trigger while you still remember. ### Setting up your first scheduled Google Sheets automation 1. **Do the task by hand once, slowly** — Write down every step including the ones you do without thinking. Those are the ones that break automations. 2. **Try recording it as a macro first** — Extensions, Macros, Record macro. If the recording does the job, you are finished and you wrote no code. 3. **Only open Apps Script if the macro cannot cover it** — Needing a schedule, another service, or a decision inside the task are the three legitimate reasons to move up. 4. **Work on a copy of the sheet** — A script that writes to the wrong range is fast and thorough. Do not let your live file be the test. 5. **Add the trigger and set it deliberately** — Pick the least frequent schedule that still meets the need. Every minute is rarely what anyone actually requires. 6. **Make failures visible** — Have the script write a status line or send a message when it cannot finish. Silent failure is the real risk of a timer. 7. **Note who owns it, in the sheet itself** — Triggers run as their creator. That one line will save someone an afternoon in a year's time. ## Where does AI fit next to macros and scripts? AI covers the part neither of the other two can: the steps that depend on what the data actually says. A macro cannot decide that three spellings are the same supplier. A script can, but only if you write the rule for every case in advance, which is exactly the work you were trying to avoid. So a good setup usually mixes them. A trigger decides when. A macro or script does the mechanical reshaping. Something with judgement handles the rows that do not fit the pattern, and says so rather than guessing quietly. The honest cost difference is worth stating. A macro run costs nothing and gives the same result every time. A judgement based step costs something per run and can vary between runs. That trade is good value on messy work and pure waste on work that never varies. That mix is what we packaged at [Sistava](/hire-ai-employees). Instead of owning a trigger, a script and a quota, you hire an AI Employee, tell it what should happen and when, and it comes back to you about the rows it was not sure about instead of writing a guess into your sheet. ## What Google Sheets automation will not do It will not carry a file that has outgrown a spreadsheet. Google documents a limit of 10 million cells or 18,278 columns, which is column ZZZ, for spreadsheets created in or converted to Sheets. Files imported from Excel or CSV carry the same ceiling. - **Quotas are real. **Google documents that installable triggers are subject to Apps Script trigger quota limits, and that an add-on can use a time-driven trigger once per hour at most. - **Read-only opens do not fire triggers. **Google documents that installable triggers do not run when a file is opened in view or comment mode. - **Very long cells get dropped on import. **Google notes that converting from Excel removes any individual cell over 50,000 characters. - **Connected Sheets has its own ceilings. **Google documents up to 200,000 rows for Connected Sheets pivot tables, and up to 500,000 rows or 5 million cells for extracts. - **Nothing here chases a person. **The tab is stale because someone did not update it, and no trigger fixes that. None of those are reasons to avoid automating. They are reasons to check the ceiling before you build something you will have to unpick. If you are anywhere near the cell limit, the sheet has become a database with a friendly face, and the right move is to treat it as one. If you would rather test the judgement half before committing to anything, a few of our small tools are open to anyone at [Sistava](/free-ai-tools) and need no account to try on a sample of your own data. ## FAQ ### How do I record a macro in Google Sheets? Open your spreadsheet, click Extensions, then Macros, then Record macro. Choose absolute references if the macro should act on the exact cells you recorded, or relative references if it should act on whatever cell you have selected and the cells near it. Complete your task, click Save, then name the macro and optionally give it a shortcut. ### Can Google Sheets run something automatically every day? Yes, with an Apps Script time-driven trigger. Google documents that time-driven triggers can run as frequently as every minute or as infrequently as once per month. Pick the least frequent schedule that still meets your need, because triggers are subject to Apps Script quota limits. ### Why does my Apps Script trigger not run? Google documents three common causes. Installable triggers do not run when a file is opened in read-only view or comment mode. They cannot be fired by script executions or API requests. And they always run under the account of the person who created them, so a trigger will fail if that account has lost access to something the script needs. ### Do I need to know code to automate Google Sheets? Not for the first level. A recorded macro requires no code at all, and Google's Manage macros screen lets you rename, reshortcut or remove them afterwards. You only need Apps Script when the task must run on a schedule, reach another service, or make a decision that a recording cannot express. ### Is a macro or AI better for cleaning spreadsheet data? It depends on whether the cleanup is the same every time. A macro replays fixed steps exactly and costs nothing per run, which is ideal for predictable reshaping. AI is better when each row is a small judgement, such as matching inconsistent supplier names, because a recording cannot notice that two spellings mean the same thing. ### How big can a Google Sheet get? Google documents a limit of 10 million cells or 18,278 columns, which is column ZZZ, for spreadsheets created in or converted to Google Sheets, and the same ceiling for files imported from Excel or CSV. Connected Sheets has separate limits, documented as up to 200,000 rows for pivot tables and up to 500,000 rows or 5 million cells for extracts. ## Sources - [Google Docs Editors Help, ](https://support.google.com/docs/answer/7665004)Automate tasks in Google Sheets - [Google for Developers, ](https://developers.google.com/apps-script/guides/triggers/installable)Installable triggers - [Google Drive Help, ](https://support.google.com/drive/answer/37603)Files you can store in Google Drive **Tags:** google-sheets, apps-script, spreadsheet-automation, macros, productivity