Chapter 16

Learning VBA for Data Analysis

Record a Macro

A macro is a sequence of instructions that perform one or more actions or return a result. You can save time and make the process of creating a macro easier by recording some or all of the actions you want your macro to perform. To build a macro that manipulates Excel in some way, you use the macro recorder. After you activate the recorder, you use Excel to perform the action or actions that you want in the macro, which Excel then translates into the equivalent VBA statements and stores as a macro for later use. You can store your recorded macros in any workbook, but Excel provides a special workbook for this purpose: the Personal Macro Workbook.

Record a Macro

Click the View tab. ...

Get Excel Data Analysis: Your visual blueprint for analyzing data, charts, and PivotTables, 4th Edition 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.