You're writing a VBA function and want to call a built-in Excel function from within VBA code.
Use the WorksheetFunction object to gain access to Excel's functions from within VBA code. Read Recipe 2.13 for more information on the WorksheetFunction object.
Getting Acquainted with Visual Basic for Applications
Collecting and Cleaning Up Data
Time Series Analysis
Curve Fitting and Regression
Numerical Integration and Differentiation
Solving Ordinary Differential Equations
Solving Partial Differential Equations
Performing Optimization Analyses in Excel
Introduction to Financial Calculations