Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

To automate a repetitive task so that you can do the task again with a single click, you can use the Developer tab in Excel for Mac to record and run a macro. You can also create a macro by using the Visual Basic Editor in Microsoft Visual Basic for Applications (VBA) to write your own macro programming code. If you no longer use a macro, you can delete it.

Record a macro

When you record a macro, the macro recorder records all the steps required to complete the actions that you want your macro to perform. These steps can include typing text or numbers, clicking cells or commands on the ribbon or on menus, formatting, selecting cells, rows, or columns, and dragging your mouse to select cells on your spreadsheet. The commands for recording, creating, and deleting macros are available on the Developer tab on the Ribbon.

  1. If the Developer tab is not available, do the following to display it:

    1. Select Excel > Preferences > Ribbon & Toolbar.

    2. Under Customize the Ribbon, select Main Tabs and then check Developer.

    3. Click Save and then close Excel Preferences.

    Excel for Mac Developer tab Preference
  2. On the Developer tab, click Record Macro.

    Note: To create a macro from VBE, click Visual Basic. In the code window of the module, type the macro code that you want to use.

    Excel for Mac Record Macro
  3. In the Macro name box, enter a name for the macro.

    The first character of the macro name must be a letter. Subsequent characters can be letters, numbers, or underscore characters. Spaces cannot be used in a macro name; an underscore character works well as a word separator. If you use a macro name that is also a cell reference, you may get an error message that the macro name is not valid.

  4. In the Store macro in list, select This Workbook.

  5. In the Shortcut key box, type any lowercase letter or uppercase letter that you want to use.

    Excel for Mac Record Macros Form

    Note: The shortcut key will override any equivalent default Excel shortcut key while the workbook that contains the macro is open.

  6. In the Description box, type a description of the macro and click OK.

  7. Complete recording your macro.

  8. On the Developer tab, click Stop Recording.

Top of Page

Delete a macro

  1. On the Developer tab, click Macros.

  2. In the list, click the macro that you want to delete, and click the delete button.

    Select a macro and click the minus sign to delete it

Top of Page

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×