Excel Macros
If you have a task that you perform in Excel over and over again, you could cut down on tedious repetition by creating and using an Excel macro. There are two ways you can create a macro in Excel. You can either record your mouse clicks and keystrokes, or you can enter the dark world of programming using VBA (Visual Basic for Applications) and write the code for your macro.
Recording A Macro
When we record a macro in Excel, we are recording the sequence of commands we use to perform a certain task. When the macro has been created, you can then run it and it will repeat the same commands in exactly the same sequence that you recorded them. Excel behaves as if you were performing those commands manually.
To create a macro using this method:
- tell Excel to start recording
- perform all the actions that comprise your task
- tell Excel to stop recording
In the background, Excel encodes the macro using VBA. Although you can get your hands dirty by writing code in VBA to create your Excel macros manually, this method requires no VBA expertise.