How to Use Macro in Excel

How to Use Macro in Excel

There are several ways to run a macro in Microsoft Excel. A macro is an action or a set of actions that you can use to automate tasks. Macros are recorded in the Visual Basic for Applications programming language. You can always run a macro by clicking the Macros command on the Developer tab on the ribbon. Depending on how a macro is assigned to run, you might also be able to run it by pressing a combination shortcut key, by clicking a button on the Quick Access Toolbar or in a custom group on the ribbon, or by clicking on an object, graphic, or control. In addition, you can run a macro automatically whenever you open a workbook.

Before you run macros

Before you start working on macros you should enable the Developer tab.

  • For Windows, go to File > Options > Customize Ribbon.

  • For Mac, go to Excel > Preferences... > Ribbon & Toolbar.

  • Then, in the Customize the Ribbon section, under Main Tabs, check the Developer check box, and press OK.

Run a macro from the Developer tab
Run a macro by pressing a combination shortcut key
Run a macro by clicking a button on the Quick Access Toolbar
Run a macro by clicking a button in a custom group on the ribbon
Run a macro by clicking an area on a graphic object
Run a macro from the Visual Basic Editor (VBE)
Configure a macro to run automatically upon opening a workbook

Related Videos