To delete a macro in Google Sheets, open the spreadsheet in a desktop web browser and choose Extensions > Macros > Manage macros. Find the macro, open its three-dot menu, and choose Delete macro; if you also want its underlying script code gone, inspect the spreadsheet’s Apps Script project afterward.
What deleting a Google Sheets macro does
A Google Sheets macro is a saved set of actions that can be run again in a spreadsheet. When you record one, Sheets creates Apps Script code in a script project associated with that spreadsheet. The macro is then listed under Extensions > Macros, where it can be run or managed.
Deleting the macro removes it as a saved, runnable macro in that spreadsheet. It does not reverse changes made by earlier runs: if a macro previously formatted cells, filled a range, or changed values, deleting the macro does not put the spreadsheet back the way it was. It also does not delete the spreadsheet itself.
There is a useful distinction between the macro entry and its underlying Apps Script code. If your goal is simply to remove a command from the Macros menu, use Manage macros. If your goal is to remove all code associated with it, check the Apps Script project as well. A project can contain other functions or automation, so do not erase the whole project just to remove one macro.
Delete a macro from the spreadsheet
Use the spreadsheet’s browser interface. The exact labels can change as Google updates its interface, but the usual route is Extensions > Macros > Manage macros.
- Open the correct spreadsheet in Google Sheets in a desktop browser. If you have several similar files, check the file name before changing anything.
- Choose Extensions > Macros > Manage macros.
- Locate the macro you want to remove. Check its name carefully, especially if several macros have similar names.
- Open the three-dot menu beside that macro and choose Delete macro.
- If Sheets asks you to confirm, confirm the deletion. Reopen Extensions > Macros to check that the macro is no longer listed.
If the option is missing, first confirm you are in the spreadsheet that owns the macro and are using Sheets in a browser rather than a mobile app. You may also lack permission to change the spreadsheet or its script. In a shared file, ask the owner or an editor with the necessary access to make the change.
Remove the related Apps Script code too
Macros are implemented as Apps Script functions. If you need to remove the code as well as the visible macro, open Extensions > Apps Script from the spreadsheet. Review the project before editing: the function for a recorded macro is commonly named after the macro, but names can change, and the project may contain other useful functions.
Look for the function that belongs to the macro you removed. Before deleting it, check whether another function, a custom menu, or an installed trigger calls it. A function that appears to be a macro may also be used elsewhere in the project. If you are not sure, keep a copy of the code or ask the project owner to review it.
When you are confident the function is no longer needed, remove only that function and save the script project. Then return to the spreadsheet and check the Macros menu again. If you want to preserve a record, copy the code into a secure document or make a copy of the spreadsheet before editing. Avoid deleting the entire Apps Script project unless you intend to remove every script and automation attached to the file.
What happens to data and previous runs
Removing a macro affects future use of that macro; it is not a cleanup command for the spreadsheet’s existing contents. For example, suppose a macro applies a blue fill to overdue invoices and you delete the macro afterward. The blue fills already applied remain. Likewise, any values the macro wrote or formulas it inserted remain until you change them separately.
Deleting a macro is also not the same as deleting a sheet, clearing a range, or revoking every permission granted to an Apps Script project. Treat those as separate tasks. If a script has access to external services or other Google data, review its code and authorizations rather than assuming removal of a macro entry automatically addresses every security or access concern.
Google Sheets does not provide the usual Ctrl+Z undo for a macro run, and deleting the macro is not a way to undo one. If the macro changed cell contents, use a suitable backup or carefully restore the affected cells. Version history may help recover spreadsheet content, but do not rely on it as a substitute for saving a copy before code changes.
Before you delete: check sharing and dependencies
In a shared spreadsheet, a macro may be part of another person’s routine. Removing it can affect everyone who uses the file, not just the person who created it. Before deleting one in a team workbook, check whether colleagues, instructions, or recurring workflows depend on it.
- Confirm the macro’s purpose by reviewing its name, description, and—if needed—its script.
- Ask whether a custom menu, another script function, or a documented process relies on it.
- Make a copy of the spreadsheet if you may need to restore the macro or compare behavior later.
- After removal, tell collaborators what changed and whether they need a replacement process.
These checks matter most for operational spreadsheets, such as shared order logs or monthly reporting files. A macro called FormatReport might look cosmetic, but it could also prepare a report that another process expects. Confirm what it does before removing its code.
Common problems and fixes
If Manage macros is unavailable, make sure the file is open in Google Sheets on a computer browser and that you opened the intended spreadsheet. Mobile interfaces may not expose the same macro-management controls. If you have view-only access, ask the owner for edit access or ask them to remove the macro.
If you deleted a macro but still see related code in Apps Script, that does not necessarily mean the deletion failed. The visible macro listing and project code are related but distinct things to inspect. Remove the remaining function only after checking whether anything else uses it. Conversely, if a macro still appears in the menu, reopen Manage macros and verify that you removed the correct entry from the correct file.
If running a macro produces an authorization prompt, that is separate from deleting it. Apps Script may ask a user to grant permissions when a script accesses protected services. Do not approve a prompt unless you recognize the spreadsheet and understand why the script needs the requested access. Removing an unused macro is sensible, but it is not a substitute for reviewing scripts that remain in the project.
Google Sheets macros compared with Excel macros
Google Sheets macros are based on Apps Script, while Excel macros commonly use VBA. The tools, code, permissions, and management interfaces are different, so instructions for deleting an Excel macro do not apply directly to Google Sheets. In Sheets, start at Extensions > Macros > Manage macros; in Excel, macro management is handled through Excel’s own interface and VBA tools.
A spreadsheet file exported between the products may not preserve every automation feature in a directly usable form. If you are moving a workflow between Sheets and Excel, plan to recreate or adapt the automation for the destination application and test it on a copy. Do not assume that removing a Google Sheets macro removes an Excel macro in another file, or that the two systems share the same script.
Alternatives to deleting a macro
If you are unsure whether the macro will be needed again, consider making a copy of the spreadsheet first. Another option is to document what the macro does and keep its code somewhere appropriate before removing it from the active file. This is useful when a macro is temporarily unused but may be needed for a monthly or annual task.
If the problem is that a macro runs unexpectedly, identify how it is being started before deleting unrelated code. A recorded macro is usually run from the Macros menu, but a broader Apps Script project may also include triggers or custom menus. Review the project and remove or adjust only the automation responsible. If the goal is merely to stop accidental use, clear documentation and limiting edit access may be more appropriate than deleting a function that other work depends on.
Frequently Asked Questions
Can I delete a Google Sheets macro on my phone?
Use a desktop web browser for the full macro-management controls. The mobile app may not show the same Extensions and Manage macros options, so switch to a computer browser if you cannot find them.
Does deleting a macro erase the data it changed?
No. Deletion removes the macro for future use; it does not undo previous runs or reverse formatting and edits already made. Restore affected cells separately from a backup or other suitable source.
Does Delete macro remove the Apps Script code?
The macro is backed by Apps Script, so inspect the project through Extensions > Apps Script if you need to remove code too. Check for other functions or automations that might depend on it before deleting anything.
Can I undo deleting a macro with Ctrl+Z?
Do not rely on Ctrl+Z to restore a deleted macro or reverse a macro run. Save a copy before making changes, and preserve the relevant script code if you may need it later.
Why can’t I see Manage macros?
Check that you opened the spreadsheet in a desktop browser, that it contains macros, and that you have permission to edit it. If the file belongs to someone else, ask its owner or an editor to manage the macro.
Will deleting a macro delete the spreadsheet?
No. It removes the macro from that spreadsheet’s macro list. The spreadsheet and its existing cell data remain, although any code or automation should be reviewed separately if you intend to remove it too.
Related
- Where Is AutoFit in Excel? Find the Column and Row Tools
- General in Excel: Find and Use the Number Format Setting
- Microsoft Access vs Excel: Which Tool Should You Use?
Try it: the Column Letter to Number: aA is 27, XFD is 16,384. Converts both ways.
More in VBA & macros
- Add a Hyperlink to a VBA MsgBox in ExcelYou cannot add a genuinely clickable hyperlink inside Excel VBA’s built-in MsgBox: it displays plain text and its…
- VBA Get Character From String: Mid, Loops & TipsTo get one character from a VBA string by position, use Mid$(text, position, 1). For example, Mid$("Excel VBA",…
- VBA Keep UserForm on Top: Windows API MethodYes. In Excel VBA for Windows, you can keep a UserForm above other windows by calling the Windows…
- Best Excel Macro to Get: Useful Tools and Safe PicksThe best Excel macro to add first is a timestamped backup macro: it saves a dated copy of…
- Excel VBA Get Worksheet Index: Methods and ExamplesIn Excel VBA, read a worksheet’s Index property to get its position in the workbook’s sheet-tab order: for…
- VBA Function As Boolean: How to Return True or FalseYes. In VBA, declare a function with As Boolean when it should return either True or False, then…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.