98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel Training and help » Functions within functions
Functions within functions
Resolved · Low Priority · Version Standard
James has attended:
Excel Advanced course
Excel VBA Intro Intermediate course
Excel VBA Advanced course
Functions within functions
How do you call a predefined function in a User defined function?
RE: Functions within functions
Hi James
Thank you for your question
I am assuming that you want to use one of the standard functions within your user defined function
To do this use need to use the work sheet function property of the application object.
For example the following code calculates the average of a range of cells and then returns it to a variable called MyAverage
MyAverage = Application.WorksheetFunction.Average("B1:D15")
Hope this is useful
Regards
Stephen
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Hiding a worksheet in ExcelWant to circulate an Excel workbook file but keep certain worksheets hidden from your colleagues' view? |