Excel contains an automated tool, called a macro, which can be used to perform common, repetitive tasks. A simple macro can be set to record keystrokes and mouse clicks when a user is performing a task, such as entering and organizing a list of names into an Excel spreadsheet. Once recorded, whenever it is time to enter a new set of the same kind of data, the user can have the macro perform this function by playing it back.
- Skill level:
Other People Are Reading
Decide on the process that you want the macro to record. For instance, you can create a macro that will take care of summing up the numbers in a column.
Open a workbook in Excel. Click on one the cells you want to format.
Click on the "Tools" button on the tool bar. Highlight "Macro" on the Tools menu and then select "Record New Macro" from the Macro menu. A "Record Macro" dialog box appears which you can use to enter a name and description of your macro, select a shortcut key and choose a storage location.
Type a name for the new macro in the "Macro name" field. The name you choose must start with a letter and cannot include spaces. You can use a combination of letters, numbers and underscores.
Enter a shortcut key. This step is optional but it is a way to activate your macro quickly. Use any of the letters or symbols on your keyboard
Choose a storage option for your macro. You can store it in a new workbook, in the current workbook or in a personal macro workbook. Storing your macros in a personal macro workbook will make them available if you want to use any of them in a new spreadsheet.
Enter a description of your macro in the "Description" field. This step is also optional.
Click "OK" to continue and to begin the recording. A "Stop Recording" box will appear, showing that the macro has started recording.
Perform the tasks that you want the macro to record. When you have finished the process, click the blue button in the macro recording box to stop the recording.
Tips and warnings
- Saving your macro with a description is helpful when you need to select it from a group of macros.