No local names are recorded for this entry.
What it does
value1 = value2
A = B returns the logical TRUE or FALSE according to whether the two operands are equal
under Excel's comparison rules — which are not the rules of IEEE-754, not the rules of
ordinary string equality, and not the rules of a type-strict language.
Three rules do all the work. They are shared by all six comparison operators, and this page
is where they are stated in full.
Rule 1 — cross-type ordering, not cross-type coercion
any Number < any Text < any Logical
So the number 10 is less than the text "2", and FALSE is greater than any number. Under
this rule A = B between operands of different kinds is always FALSE, no matter how
convertible they look. This is the single most important thing on the page: 1 = "1" is
false, and every "why doesn't my lookup match?" question in a spreadsheet forum eventually
arrives here.
Note the contrast with arithmetic: + does coerce "1" to 1. Comparison
and arithmetic have opposite doctrines about text, in the same formula language.
Rule 2 — text comparison is case-insensitive
The contract records comparison text lanes as case-insensitive on the admitted slice, with
="a"="A" yielding TRUE. = is therefore not string identity. EXACT is the
case-sensitive alternative.
Beyond case, text comparison raises collation questions — accents, ligatures, non-Latin
scripts, locale-specific ordering — which the contract explicitly puts out of slice ("locale
and collation-sensitive text ordering beyond the current installed baseline"). Apart from the
Hangul jamo pairs in FN-OP_EQUAL-001, nothing about non-ASCII text ordering is settled here.
Rule 3 — numeric equality is normalized, not exact
The rule that surprises engineers most. The contract records that numeric-vs-numeric
comparisons on the admitted operator slice do not use exact IEEE-double equality, but a
currently pinned normalization lane, with the current local model described as
"truncation-style normalization to 15 significant decimal digits on the tested compare
paths, not round-to-nearest". Its baseline finding is the classic one: =0.1+0.2=0.3 yields
TRUE, together with the matching results for the other five comparisons.
This is why a spreadsheet appears not to suffer from floating-point equality problems while
the arithmetic underneath it plainly does. The comparison layer hides the residue that the
arithmetic layer creates.
Two consequences worth spelling out:
- Equality here is not the same relation as bitwise equality. Two distinct doubles can
compare equal. Any implementation that reaches for
a == b on doubles has implemented a
different function.
- Whether the relation is transitive depends on which model is right. A normalization
model (round or truncate each operand to 15 significant digits, then compare exactly) is
transitive: it is equality of a function of the operands. A tolerance model (compare the
difference against a scaled epsilon) is not transitive:
a≈b and b≈c need not give
a≈c. The contract names the normalization model as its current local one and marks the
whole lane as currently pinned rather than settled — so transitivity of = on numbers is
an open question with a decisive experiment behind it.
The other =
The = a reader types first is not this function. A leading = introduces a formula: it is
grammar, telling the host that what follows is an expression rather than literal content.
This operator is the = that appears inside an expression, between two subexpressions.
=A1=B1 contains both: the first = is the formula marker, the second is
FUNC.OP_EQUAL. Chapter 03 draws exactly this line — parse-only syntax carries no semantics
and gets no function identity, while every evaluable operator does.
Arguments
Arity is exactly 2; no optional arguments, no defaults. Equality is symmetric, so operand
order does not change the value — but it does set the broadcast orientation when the operands
are arrays of different shapes.