Use the Developer tab to create or delete a macro in Excel 2016 for Mac
To automate a repetitive task so that you can do the task again with a single click, you can record a macro in Excel. 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.
-
If the Developer tab is not available, do the following to display it:
On the Excel menu, click Preferences > View. And then under In Ribbon, Show, check Developer tab.
-
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.
-
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.
-
In the Store macro in list, select This Workbook.
-
In the Shortcut key box, type any lowercase letter or uppercase letter that you want to use.
Note: The shortcut key will override any equivalent default Excel shortcut key while the workbook that contains the macro is open.
-
In the Description box, type a description of the macro and click OK.
-
Complete recording your macro.
-
On the Developer tab, click Stop Recording.
Delete a macro
-
On the Developer tab, click Macros.
-
In the list, click the macro that you want to delete, and click the delete button.
No comments:
Post a Comment