Have you used a voice recording?
The main benefit of such a device is that everything you said once can be repeated over and over again without you physically speaking again. Your voice is on the tape.
You can even be heard without you having been there.
Excel’s macro recorder feature is a similar device. The difference is that it stores Excel actions instead of your voice. These actions can be repeated over and over again without your physical intervention in Excel. For example:
- Select a given data region, insert a table, and create a pivot table
- Select a header from a given table and apply a particular format
- Delete all empty sheets
- Delete all sheets except the current one
- Arrange cells in a particular layout
- And more…
An audio tape is a set of recorded sounds.
A macro is a set of recorded instructions.
What kind of instructions? Actions like: change the color of a cell, rename a sheet, create a table, sort, filter, etc.
To play your voice, press the Play button on the recording device; On the other hand, to reproduce a set of actions in Excel, you run a Macro. At the same time, your voice is recorded on magnetic tape, while your Excel actions are recorded in a text file, specifically in a Sub procedure inside a text window called “Module”.
How do you record instructions in a macro?
If you are using Excel 2007 or 2010, go to: View>Record Macro>Macro Name:>OK
Or click the record icon on the status bar.
The Excel 2007/2010 status bar also indicates that Excel is in recording mode…
in excel 2003
Navigate to: Tools>Macro>Record New Macro
And specify the Macro settings (name, description, etc.)…
After pressing OK, the status bar indicates that Excel is in recording mode…
While this mode is on, EVERYTHING you do in Excel will be recorded.
This is not as good as it might seem; In the same way that your voice recording device records your hesitations and background noise, Excel’s recorder captures all your mistakes and incidental actions.
This creates the need to edit recorded actions in Macros.
And note that while Excel is in record mode, its behavior is normal, with one exception: in the background, Excel creates a Module (Module1, Module2, Module3, ModuleN) and a Sub procedure with the name you specify in the “Record Macro Dialog Box”. Default: Macro1, Macro2, Macro3, MacroN.