WorksheetFunction.Erf method (Excel)

Returns the error function integrated between lower_limit and upper_limit.

Important

This function has been replaced with one or more new functions that may provide improved accuracy and whose names better reflect their usage. This function is still available for compatibility with earlier versions of Excel. However, if backward compatibility is not required, you should consider using the new functions from now on, because they more accurately describe their functionality.

For more information about the new function, see the Erf_Precise method.

Syntax

expression.Erf (Arg1, Arg2)

expression A variable that represents a WorksheetFunction object.

Parameters

Name Required/Optional Data type Description
Arg1 Required Variant Lower_limit - the lower bound for integrating Erf.
Arg2 Optional Variant Upper_limit - the upper bound for integrating Erf. If omitted, Erf integrates between zero and lower_limit.

Return value

Double

Remarks

If lower_limit is nonnumeric, Erf returns the #VALUE! error value.

If lower_limit is negative, Erf returns the #NUM! error value.

If upper_limit is nonnumeric, Erf returns the #VALUE! error value.

If upper_limit is negative, Erf returns the #NUM! error value.

Screenshot of the erf method where the error function is the integral of the lower and upper limits.

Second screenshot of the erf method where the error function is the integral of the lower and upper limits.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.