WorksheetFunction.Delta method (Excel)

Tests whether two values are equal. Returns 1 if number1 = number2; otherwise, returns 0.

Syntax

expression.Delta (Arg1, Arg2)

expression A variable that represents a WorksheetFunction object.

Parameters

Name Required/Optional Data type Description
Arg1 Required Variant Number1 - the first number.
Arg2 Optional Variant Number2 - the second number. If omitted, number2 is assumed to be zero.

Return value

Double

Remarks

Use this function to filter a set of values. For example, by summing several DELTA functions, you calculate the count of equal pairs. This function is also known as the Kronecker Delta function.

If number1 is nonnumeric, Delta returns the #VALUE! error value.

If number2 is nonnumeric, Delta returns the #VALUE! error value.

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.