Chapter 10. Macro-Charged Reporting

Amacro is essentially a set of instructions or code that you create to tell Excel to execute any number of actions. In Excel, macros can be written or recorded. The key word here is recorded.

The analogy I often use is that recording a macro is like programming a phone number into your cell phone. You first manually dial and save a number. Then when you want, you can redial those numbers with the touch of a button. Just as on a cell phone, you can record your actions in Excel while you perform them. While you record, Excel gets busy in the background, translating your keystrokes and mouse clicks to written code (also known as VBA; Visual Basic for Applications). After a macro is recorded, you can play back those actions anytime you wish.

In this chapter, I explore macros and reveal how you can use macros to automate your recurring processes to simplify your life.

Why Use a Macro?

The first step in using macros is admitting you have a problem. Actually, you have several problems:

  • Problem 1: You're making donuts: You do the same tasks over and over again. As each new month rolls around, you have to make the donuts (that is, crank out those reports). You have to import that data. You have to refresh those pivot tables. You have to delete those columns, jump up, turn around, and do the hokey pokey. Who needs it? Wouldn't it be nice if you could fire up a macro and have those more redundant parts of your reporting processes done automatically?

  • Problem 2: ...

Get Excel® 2007 Dashboards & Reports For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.