Text functions
EXACT
Matches all 8 recorded answers
Recorded: 8 workbook cells. How we measure this · See the Rust code
Local names in 40 languages
| Language | Name in Excel |
|---|---|
| Arabic | EXACT |
| Bulgarian | EXACT |
| Czech | STEJNÉ |
| Danish | EXACT |
| German | IDENTISCH |
| Greek | EXACT |
| English (Australia) | EXACT |
| English (United Kingdom) | EXACT |
| English (United States) | EXACT |
| Spanish | EXACT |
| Estonian | EXACT |
| Finnish | VERTAA |
| French | EXACT |
| Hebrew | EXACT |
| Croatian | EXACT |
| Hungarian | AZONOS |
| Indonesian | EXACT |
| Italian | EXACT |
| Japanese | EXACT |
| Korean | EXACT |
| Lithuanian | EXACT |
| Latvian | EXACT |
| Norwegian | EXACT |
| Dutch | GELIJK |
| Polish | PORÓWNAJ |
| Portuguese (Brazil) | EXATO |
| Portuguese (Portugal) | EXATO |
| Romanian | EXACT |
| Russian | Функция СОВПАД |
| Slovak | EXACT |
| Slovenian | EXACT |
| Serbian (Latin) | EXACT |
| Swedish | EXACT |
| Thai | EXACT |
| Turkish | ÖZDEŞ |
| Ukrainian | EXACT |
| Vietnamese | EXACT |
| Chinese (Simplified) | EXACT |
| Chinese (Hong Kong) | EXACT |
| Chinese (Traditional) | EXACT |
Names from Microsoft's support site.
What it does
EXACT(text1, text2)
EXACT compares two text values and returns TRUE if they are the same and FALSE otherwise.
Microsoft's article adds the two qualifications that make it a distinct function rather than a
synonym for =: the comparison is case-sensitive, and it ignores formatting
differences.
Both qualifications are worth stating precisely.
Case-sensitive means EXACT("Word","word") is FALSE, where the equality operator
A1="word" would be TRUE for the same pair. This is the whole reason the function exists:
Excel's = comparison of text is case-insensitive, and there is no operator that is not.
What the documentation does not say is what "the same" means below the level of characters. Text in the Handbook's value model is a sequence of UTF-16 code units (chapter 01), and two strings can look identical, print identically, and still differ:
- é as one code point (U+00E9) versus e followed by a combining acute (U+0065 U+0301). These are canonically equivalent under Unicode normalisation and different as code-unit sequences.
- The same glyph reached through different variation selectors or through compatibility characters.
An implementation that normalises before comparing and one that compares code units answer differently on those inputs. Microsoft's article does not choose; it is the sharpest unresolved question on this page.
Arguments
text1, text2 — both required; the article describes them simply as the first and second
text strings. Both are text arguments, so a number or a logical converts to text before
comparison. Two consequences readers hit regularly:
EXACT(1,"1")compares the text1against the text1. The number's General rendering is what is compared, so this is a comparison of renderings, not of values.EXACT(A1,"")withA1an empty cell compares empty text against empty text. Empty and empty-string are different value kinds at the call boundary (chapter 01) but they converge here, which is whyEXACTcannot distinguish a blank cell from a cell containing="". UseISBLANKfor that question.
There is no third argument: no locale, no normalisation form, no "ignore whitespace" option.
Try it
Quirks
Result and edge cases
The return kind is Logical — TRUE or FALSE, not 1 or 0, though it converts to those in
numeric contexts.
- Leading and trailing spaces count. Microsoft's own example set includes
"w ord"versus"word"asFALSE; a difference in internal spacing is a difference. - Two empty texts compare
TRUE. - The function is symmetric and reflexive on any input it accepts. It is not transitive across
coercion boundaries in the way readers assume:
EXACT(1,"1")andEXACT("1","1.0")do not compose, because the coercion happens once, on entry.
Errors
The article lists no error conditions of the function's own. Reachable errors are the shared
ones: an error value in either argument propagates
(chapter 02), and a value kind with no text conversion
surfaces #VALUE! under the shared coercion rules.
Note the asymmetry with the comparison operator: ="a"="a" never errors, while EXACT
inherits the whole coercion pipeline and therefore can.
How to implement
Notes for implementers
- Pick a comparison level and declare it. Code-unit equality, code-point equality, NFC-then- compare, and full case-sensitive collation are four different functions. They agree on ASCII, so ASCII tests cannot distinguish them.
- Do not use a locale collator. Collation is designed to make visually-equivalent strings
compare equal and is exactly the wrong tool here;
EXACTis a sameness test, not an ordering. - Ill-formed UTF-16 must not panic. The value-universe chapter records lone surrogates as a reachable state in Excel text, so the comparison has to be defined over raw code units even if the rest of the implementation decodes.
Rust code
Show the CalcFunc source of this function
Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.
EXACT · 5 lines · calc-func/src/catalogue/text_functions.rs on GitHub19 exact_fn "EXACT" (2, 2) [V "text1", V "text2"] |s, a, sv| {
let left = text_arg(s, a, 0)?;
let right = text_arg(s, a, 1)?;
Ok(CalcValue::logical(left.utf16_code_units() == right.utf16_code_units()))
}
Kernels shared with other functions
side_countcatalogue/text_functionsleftcatalogue/text_functionsrightcatalogue/text_functionstextported/text_kernelstext_from_strported/text_kernelsdate_integer_floorported/text_kernelsnonnegative_countported/text_kernelsunit_widthported/text_kernelscharacter_boundaryported/text_kernelsslice_character_countported/text_kernelscharacter_scan_endported/text_kernelslen_character_countported/text_kernelstake_leftported/text_kernelstake_rightported/text_kernelstruncatedported/text_kernelspush_singleton_or_originalported/text_kernelspush_upperported/text_kernelsupperported/text_kernels
Argument and result plumbing
No implementation has been published with a Handbook test suite for this function.
Version differences
No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.
Alternatives
Relationships
=(the equality operator,FUNC.OP_EQ) is the case-insensitive counterpart. Choosing between them is the single most common reason to reach forEXACT.FIND/SEARCHcarry the same case-sensitivity split for substring search:FINDis case-sensitive,SEARCHis not.EXACTis to=asFINDis toSEARCH.LOWER/UPPERare the usual way to build a case-insensitive comparison explicitly. Note thatEXACT(LOWER(a),LOWER(b))anda=bare not the same predicate — case folding merges pairs that Excel's own comparison may or may not merge.DELTAis the numeric analogue (equality as a returned value rather than a branch), for numbers rather than text.
Named variants
No named variants are recorded yet.
Suggest a correction or contribute an implementation · For agents