15. An Introduction to Using Macros and UDFs

In This Chapter

• Get the most out of the macro recorder.

• Run a macro from a button on a sheet.

• Change a complex embedded IF statement into a simpler custom function.

Excel has a great tool called the Macro Recorder. It records your mouse and keyboard actions in Excel, allowing you to play them back at a later time. It does this by turning your actions into programming code, using a language called Visual Basic for Applications, or VBA. You can also use VBA to write User-Defined Functions (UDFs), functions that you can use on sheets, similar to how you use the SUM function.

VBA macros enable you to automate any process in Excel. For example, every day you import data that you apply formatting ...

Get Excel® 2013 Absolute Beginner’s Guide now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.