If you know Visual Basic programming then you can create your own user-defined functions in Excel 2007 or Excel 2010. Follow the steps below:
1. Click on Excel Developer tab. If you can’t see the developer click Here.
![]()
2. On the Code group click Visual Basic.
3. You will be switched to Visual Basic Editor Menu.
4. On the Insert menu (Visual Basic Editor) select Module.
5. This will open the code window.
6. Type the Visual Basic code for your function.
7. On the File menu click Close and return to Microsoft Excel.
8. Your new function should now be ready for use like any other Excel function.










