27. Automating Repetitive Functions Using VBA Macros

Every copy of Excel shipped since 1995 has included the powerful Visual Basic for Applications (VBA) lurking behind the grid. With VBA, you can do anything that you can do in the regular interface, and you can do it much faster. VBA shines when you have many repetitive tasks to undertake.

Learning to use macros is a good news/bad news proposition. The good news is that Microsoft Office provides a macro recorder that can write a macro as you work. The bad news is that it is not easy to record a macro that works consistently with any data set. To unleash the power of macros, you need to understand how to edit recorded macro code. You can then record a macro that is close to what you want and ...

Get Microsoft Excel 2010 In Depth 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.