Logical checks and errors
EXACT function: compare two text strings with case sensitivity
Standard spreadsheet equality (=) treats uppercase and lowercase letters as identical. Use EXACT when external IDs, coupon tokens, or batch codes depend on letter case.
When = says TRUE even though letter case differs
Database keys exported from external systems often distinguish "BatchA" from "batcha". Testing =A2=B2 in a spreadsheet evaluates to TRUE because standard text comparisons ignore case.
| System ID (A) | Scanned ID (B) | A=B | EXACT(A, B) |
|---|---|---|---|
| BatchA | batcha | true | false |
| BatchA | BatchA | true | true |
| BatchA | BatchA | false | false |
Test character-for-character equality with EXACT
=EXACT(A2, B2) compares both characters and casing: "BatchA" vs "batcha" returns FALSE, while "BatchA" vs "BatchA" in row 3 returns TRUE.
=EXACT(A2,B2)Trailing spaces still fail until trimmed
Row 4 ("BatchA" vs "BatchA ") fails both = and EXACT because of the trailing space. Wrap imported scans in TRIM—=EXACT(A4, TRIM(B4))—when whitespace is accidental but letter case must still match.
=EXACT(A4,TRIM(B4))Try the example
Use the original values or change them to test your understanding.