When using Microsoft Office Excel, do you find yourself repeating the same set of useful commands? Is there a way for Excel to capture these commands, turn them into one custom command, and in effect, add a command to the user interface? There is, and it's called a macro. To automate a straightforward, repetitive task, you can record, save, and run a macro.
Using macros, you can save time and expand the features of Office Excel. As an added bonus, you'll find that recording a macro is a great introduction to Visual Basic for Applications (VBA). That's because whenever you use the Excel user interface, Excel is using the Excel VBA object model behind the scenes on your behalf. When you record a macro, you automatically capture the set of VBA instructions that Excel executes for you. After you capture the macro, you can even edit (or "tweak") the macro to improve its flexibility.
Watch these demos
The following three demos show in a step-by-step way how to create, save, edit, and run macros in a safe and convenient way.
|
|
Activity |
Description |
|
|
|
|
|
|
Show me
|
Create a macro to consistently format and style a formula |
|
|
|
|
|
|
Show me  |
Create a macro to display a cell's formula in a comment |
|
|
|
|
|
|
Show me  |
Run the new macros from buttons on the Quick Access Toolbar |
|
|
|
|
Videos created by Office Online staff writers
Next steps
If your coding curiosity has been suitably aroused, and you want to enter the brave new world of programming, then take a look at the following resources. These resources will help you become more skilled at creating, editing, and using macros and VBA.