Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

 
 
Microsoft Office Excel
Search
Search
 
Check for updates: (c) Microsoft
Office downloads
 
 
 
Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
Watch this: Use macros to automate repetitive tasks
 

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
Callout 1 
Show me Macro Demo One Create a macro to consistently format and style a formula
Callout 2 
Show me Macro Demo Two Create a macro to display a cell's formula in a comment
Callout 3 
Show me Macro Demo Two Run the new macros from buttons on the Quick Access Toolbar


                             Videos created by Office Online staff writers

Assistance Problems watching the video? Try our troubleshooting tips.

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.

Macros
Super-Easy Guide to the Microsoft Office Excel 2003 Object Model
Get in the loop with Excel macros
Security III: Sign your own macros for stronger security
Demo: Enable blocked macros
Excel 2007 VBA Programming For Dummies by John Walkenbach available from www.dummies.com
advertisement