Create a User Defined Function (macro)
Create a User Defined Function Excel allows you to create custom functions , called " User Defined Functions " (UDFs) that can be used the same way you would use SUM() or some other built-in Excel function. This can be especially useful for advanced mathematics or special text manipulation . In fact, many Excel add-ins provide large collections of specialized functions. This article will help you get started creating user defined functions with a couple of useful examples Open up a new workbook. Get into VBA (Press Alt+F11 ) Insert a new module ( Insert > Module ) - Copy and Paste the Excel user defined function examples - Get out of VBA (Press Alt+Q ) Use the functions (They will appear in the Paste Function dialog box, Shift+F3 , under the "User Defined" category) If you want to use a UDF in more than one workbook, you can save your functions in your own custom add-in. Simply save your excel file that contains your VBA functions as an add-in file ( .xl