top of page

Write a Simple Macro in Microsoft Excel 2010


If you have tasks in Microsoft Excel that you do repeatedly, you can record a macro to automate those tasks using macro. A macro is an action or a set of actions that you can run as many times as you want. When you create a macro, you are recording your mouse clicks and keystrokes. After you create a macro, you can edit it to make minor changes to the way it works.

First of all, we need to get the Developer tab in the ribbon.

There are two ways we can get the Developer Tab on the ribbon.

Right click on the up arrow (^) on the Excel ribbon and click Customize the Ribbon...

OR

  1. Go to File > Options > then on the left side of the Excel Options dialog box, click Customize Ribbon. Then, on the right side select Developer.

Now, we need to change the security settings. In the same Excel Options dialog box, click Trust Center > Trust Center Settings.

In Trust Center, under Macro Settings, click Enable all Macros, then click OK.

Note: This security setting is not ideal for basic use. When you have finished creating macro, go back and unclick Enable all Macros.

Now, under the Developer Tab, click on Record Macro

In the new Record Macro dialog box, fill the information appropriately.

Name your Macro. The first character of the macro name must be a letter, you may use a number or underscores later. Also, Macro names can not have spaces.

Create a Shortcut Key (OPTIONAL). You can create a shortcut key to run your recorded macro. This is optional.

Choose where to store your Macro. In the Store Macro In list, select the workbook where you want to store the macro.

Write Description of your Macro. Write description of your macro. Here you can let users know what your macro does.

Once you click OK, the macro will start recording.

Perform the actions you want the macro to record and click the square box at the bottom to stop recording.

OR

Click Stop Recording under the Developer Tab in the ribbon.

And make sure you save your file as xlsm file extension, which allows users to save worksheet that contains macros.

Featured Posts
Recent Posts
bottom of page