Chapter 13. Automating Repetitive Tasks with Macros


13. Automating Repetitive Tasks with Macros

Chapter at a Glance

In this chapter, you will learn to:

Describe and examine macros.

Create and modify macros.

Run macros when a button is clicked.

Run macros when a workbook is opened.


Many tasks you perform in Microsoft® Office Excel® 2007 (for example, entering sales data for a particular day or adding formulas to a worksheet) are done once or (for example, changing the format of a cell range) can be repeated quickly using available tools in Office Excel 2007. However, you will often perform one or two tasks frequently that require a lot of steps to accomplish. For example, you might have a number of cells in a worksheet that contain important data you use quite often in presentations to your colleagues. Instead of going through a lengthy series of steps to highlight the cells with the important information, you can create a macro, or a recorded series of actions, to perform the steps for you. After you have created a macro, you can run, edit, or delete it as needed.

In Excel 2007, you run and edit macros using the items available in the View tab's Macros group. You can make your macros easier to access by creating new buttons on the Quick Access Toolbar, to which you can assign your macros. If you run a macro to highlight specific cells in a worksheet every time you show that worksheet to a colleague, you can save time by adding a Quick Access Toolbar button that runs a macro to highlight the cells for you.

Another handy feature of Excel 2007 macros is that you can create macros that run when a workbook is opened. For example, you might want to ensure that no cells in a worksheet are highlighted when the worksheet opens. You can create a macro that removes any special formatting from your worksheet cells when its workbook opens, enabling you to emphasize the data you want as you present the information to your colleagues.

In this chapter, you'll learn how to open, run, create, and modify macros; create Quick Access Toolbar buttons and shapes that enable you to run macros with a single mouse click; define macro security settings; and run a macro when a workbook is opened.

See Also

Do you need only a quick refresher on the topics in this chapter? See the Quick Reference entries on pages xxviilxiii.


Important

Before you can use the practice sites provided for this chapter, you need to install them from the book's companion CD to their default location. See "Using the Book's CD" on page xiii for more information.





MicrosoftR Office ExcelR 2007 Step by Step
MicrosoftВ® Office ExcelВ® 2007 Step by Step (Step By Step (Microsoft))
ISBN: 073562304X
EAN: 2147483647
Year: 2004
Pages: 143
Authors: Curtis Frye

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net