Although Excel provides hundreds of Built-In Spreadsheet Functions, you can also create your own functions by writing Excel macros to perform specific tasks.
You can even add your own macros to the Excel function menu, so that they are available to you in the same way as Excel's built-in functions.
A macro is a piece of computer code, that is written for Excel, using the Visual Basic for Applications (VBA) programming language. A basic introduction to the VBA programming language is covered in the Excel VBA Tutorial pages of this site. However, it is recommended that you read the sections below to familiarise yourself with the Excel Macro Security settings and the Visual Basic Editor, before you start to write VBA code.