DELTA function
DELTA tests whether two numbers are equal and returns 1 if they are and 0 if not. Because the results are numbers, you can add them up to count matches.
Example
Read it as a sentence: check whether 5 equals 5, giving 1 if they match and 0 if not.
A
B
C
D
1
1
2
3
Syntax
DELTA(number1, [number2])
Arguments in [square brackets] are optional.
-
number1(required) - The first number.
-
number2(optional) - The second number; default 0.
Returns: 1 if the numbers are equal, otherwise 0.
What Excel actually returns
Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.
| Formula | Excel shows | Case |
|---|---|---|
=DELTA(5,5) | 1 | Equal |
=DELTA(5,4) | 0 | Unequal |
=DELTA(0) | 1 | One arg (vs 0) |
=DELTA(1) | 0 | One arg nonzero |
=DELTA(0.1+0.2,0.3) | 0 | Float 0.1+0.2,0.3 |
=DELTA("5",5) | 1 | Text number |
=DELTA("a",5) | #VALUE! | Text |
=DELTA(TRUE,1) | #VALUE! | TRUE |
Watch out for
- Non-numeric input gives #VALUE!.
Where it works
- Excel
- DELTA is in every version of Excel from 2007 on.
- Google Sheets
- Same name, same behaviour for everyday use.
Part of Engineering functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .