The Error function is given by the equation:
For further details, see the Wikipedia Error Function pageThe Excel Erf function calculates the Error Function, integrated between two supplied limits.
The syntax of the function is:
where the arguments are as follows:
lower_limit    The lower limit of the integral. 
[upper_limit]    An optional argument which, if supplied, gives the upper limit of the integral. If the [upper_limit] argument is omitted, the integral between 0 and the supplied lower_limit is returned. 
The Erf function has been improved in Excel 2010 in that it can now accept negative function arguments.
In Excel 2007 or earlier, if you input a negative value for the upper or lower limit, the function would return an error. However, in Excel 2010, the function algorithm has been improved, so that it can now calculate the function for both positive and negative ranges.
In the following spreadsheet, the Excel Erf function is used to calculate the Error Function integrated between different limits.
Formulas:
 
Results:

Note that, in the above spreadsheet, the functions in cells A1 and A2 perform the same calculation  i.e. the integral between 0 and 1.5.
Further examples of the Excel Erf function are provided on the Microsoft Office website.
If you get an error from the Excel Erf function this is likely to be one of the following:
#NUM!    Occurs in older versions of Excel (Excel 2007 or earlier), if one or both of the supplied arguments are negative. 
#VALUE!    Occurs if one or both of the supplied arguments are nonnumeric. 