How to Create a Macro in Excel 2007

Excel 2007 includes extra features for working with the data in your spreadsheets, such as adding together values or counting the number of cells in a range. Macros are a prerecorded set of instructions that automate any series of operations in Excel. Creating a macro allows you to save time by automating repetitive tasks that you need to complete on a regular basis. Making a new macro only takes a few quick clicks.

...
Macros automate repetitive tasks in Excel 2007.

Step

Open Excel 2007 and click the "Developer" tab at the top-right end of the window. Click the "Record Macro" button at the top of the "Code" heading.

Step

Type a name for the new macro in the "Name" text box, such as "Adding Columns" or "My New Macro." Type a key in the "Shortcut Key" text box if you want to map a shortcut to the new macro. Pressing the "Ctrl" key and the key you specify will automatically run the new macro.

Step

Type a brief description of what the macro is intended to accomplish in the "Description" box if you think other users may potentially need your macro. Click "OK" to begin recording the new macro.

Step

Perform the specific operations you want recorded in the macro, such as adding together the values in columns, creating new rows or calculating the average of two cells.

Step

Click "Stop Recording" when you are done performing operations. Click the "Macros" button when you need to run the macro. Click the macro's name and then choose "Run."