EXACT Function in Microsoft Excel: Examples, Pitfalls & Compatibility
EXACT in Microsoft Excel: compare two text values with case and spaces included in the comparison. Includes worked examples and application-specific cautions.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Microsoft Excel. How formula examples are checked
Quick answer: Use EXACT in Microsoft Excel to compare two text values with case and spaces included in the comparison. The official EXACT reference is the source for the function definition and platform-specific rules described below.
Syntax and arguments
=EXACT(text1, text2)
text1 (required): The first text value to compare.
text2 (required): The second text value, including any spaces or control characters.
Examples use English function names, comma argument separators and decimal points. Adapt formula separators to your workbook settings, not punctuation inside quoted text.
When to use it
Use EXACT for case-sensitive identifiers, confirmation fields or a before-and-after text audit. A visually similar pair of cells is not enough. Choose a different comparison rule when capitalization is deliberately irrelevant.
Three worked examples
Each example is independent. Where input cells are listed, enter those values first; otherwise the formula is self-contained. Expected outputs are independently checked calculations or documented error expectations, not captured results from Microsoft Excel.
Example 1: Compare an unchanged stock code
=EXACT("Bin-07","Bin-07")
Expected result: TRUE.
The text is identical, so the logical result is TRUE.
Example 2: Detect a case change
=EXACT("Bin-07","BIN-07")
Expected result: FALSE.
The second and third letters differ in case. The visible identifier has not passed an exact text check.
Example 3: Detect a trailing space
=EXACT("Bin-07","Bin-07 ")
Expected result: FALSE.
The second value contains one extra ordinary space. Removing it would be a separate, deliberate cleanup step.
Put it to work safely
Place the original identifier and imported identifier in adjacent columns, then fill down a separate EXACT result. Filter for FALSE and inspect those rows without deleting them automatically. A mismatch might be a meaningful case change, a trailing space or a changed code. Decide the business rule before applying LOWER, UPPER or TRIM to both sides, because those operations intentionally discard distinctions.
Common mistakes and fixes
The words look identical but return FALSE. Check trailing spaces, embedded controls and case. A cell display may not make every stored character obvious.
The comparison should ignore case. Normalize case deliberately before comparing, or use an appropriate case-insensitive matching method. Do not describe that operation as an exact raw-text audit.
TRUE is being interpreted as a numeric count. EXACT returns a logical value. Keep a clear result heading and distinguish the flag from the number of matching records.
Microsoft Excel-specific notes
Microsoft states that EXACT is case-sensitive but ignores cell-formatting differences. Changing a font, fill or number-format appearance does not turn this function into a formatting-comparison tool. See the vendor reference for the current definition.
Excel and Google Sheets comparison
Both applications document case-sensitive text comparison. Avoid inferring identical coercion rules for numbers, blanks and dates from these text-only examples. Unicode strings that look alike also deserve a target-application check.
Compare the EXACT guide for Google Sheets and its official documentation. Having a guide in both libraries establishes two documented references, not a certificate of identical behavior across releases, locales or file conversions.
Related guides
LEN, TRIM, CLEAN, IF · All Microsoft Excel functions.
Evidence and testing scope
Editorial verification: Official references retrieved on 2026-10-12. The three worked cases are included in this release’s reproducible Python checking suite. It checks the stated arithmetic, calendar or text model and the expected documented error classification; it is not the Microsoft Excel calculation engine. No native application run, UI screenshot, maximum-size benchmark or cross-version certification is claimed. Review the editorial testing standards before relying on a formula in a critical workbook.