Introduction to User Defined Functions
- 01:30
Overview of user-defined functions in Excel VBA.
Downloads
No associated resources to download.
Transcript
In order to more fully exploit the capabilities of Excel VBA, there are additional areas of functionality we must understand. How to create bespoke functions, excels events, and the power of arrays.
A function is a VBA procedure that performs calculations and returns of value.
Excel and Excel VBA have a large range of predefined functions.
These functions will satisfy our requirements in most circumstances.
However, there may be occasions where we can replace long or complex formula with a single bespoke function.
Custom functions can save time when performing regular tasks that Excel cannot directly facilitate.
Creating a function is very similar to writing a sub procedure.
The main difference is that the procedure is started with the word function.
After function, a name is given to the procedure.
Any arguments required by the function are stated and then the data type, the function will output.
Instructions are then provided for the function and the procedure ends with the words and function.