Creating a User-Defined Function
The Office applications come with a large number of built-in functions. Excel, for example, has hundreds of functions-one of the largest function libraries of any spreadsheet package. However, even with this vast collection, you'll still find plenty of situations that are not covered. For example, you might need to calculate the area of a circle of a given radius, or the gravitational force between two objects. You could, of course, easily calculate these things on a worksheet, but if you need such calculations frequently, it makes sense to define your own functions that you can use anytime.
In this tutorial:
- Writing Your Own Macros
- Activating the Ribbon's Developer Tab
- Displaying the Visual Basic Editor
- Touring the Visual Basic Editor
- Understanding VBA Procedures
- Creating a Command Macro
- Entering VBA Statements
- Creating a User-Defined Function
- Understanding User-Defined Functions
- Writing a User-Defined Function
- Using a Function
- Advantage of VBA IntelliSense
- Shutting Down the Visual Basic Editor