Create Your Own Functions : Custom function « Formula « Microsoft Office Excel 2007 Tutorial






Open Visual Basic Editor.

Choose Insert and Module in the editor.

An empty code module appears.

Add the following code: Public Function Add(number1 As Double, number2 As Double) Add = number1 + number2 End Function

Return to Excel to find and use the function in the Insert Function dialog box

Enter =Add(1,2).

6.15.Custom function
6.15.1.Create Your Own Functions