Quick answer: case-sensitive text comparison

For a case-sensitive text comparison of one approval-code pair, enter =EXACT(A1,B1) in C1. With A1 and B1 both containing Approval-R7, C1 returns TRUE. EXACT returns FALSE when capitalization or any character, including a trailing space, differs.
Use this single-pair control when an approved value and an entered value must be identical. Microsoft describes EXACT as case-sensitive and notes that it ignores formatting differences such as font or cell fill. Microsoft’s EXACT guidance distinguishes this comparison from broader text-search tasks.
Why an equals check can accept the wrong code
An ordinary Excel comparison can show a match even when the capitalization is wrong. For example, =A2=B2 treats SKU-Red and SKU-red as equal and returns TRUE. That is not suitable when uppercase and lowercase letters carry meaning in an approval code.
The cause is that the equals operator is not case-sensitive for text. Use EXACT when the rule is that every character in two individual cells must match.
Case-sensitive text comparison for one approval-code pair
- Enter the approved code in A1 and the submitted code in B1.
- Enter
=EXACT(A1,B1)in C1. - Read TRUE as an identical text value and FALSE as a mismatch.
- For a separate approval-code pair, use its matching cell references rather than changing the original control values.
Enter =EXACT(A1,B1) in C1 to verify the first approval-code pair. For another independent pair, use the corresponding cells, such as =EXACT(A2,B2) in C2.
| Cell | Value or formula | Expected result |
|---|---|---|
| A1 | Approval-R7 | — |
| B1 | Approval-R7 | — |
| C1 | =EXACT(A1,B1) | TRUE |
| A2 | SKU-Red | — |
| B2 | SKU-red | — |
| C2 | =EXACT(A2,B2) | FALSE |
| A3 | Approval-R7 (one trailing space) | — |
| B3 | Approval-R7 | — |
| C3 | =EXACT(A3,B3) | FALSE |
Synthetic approval-code data: A1 contains Approval-R7, B1 contains Approval-R7, A2 contains SKU-Red, B2 contains SKU-red, and A3 contains Approval-R7 followed by one trailing space while B3 contains Approval-R7.
The expected results are TRUE in C1 for identical codes, FALSE in C2 for the case-only difference, and FALSE in C3 for the trailing-space difference. The third row makes an otherwise hard-to-see space mismatch explicit.
Compatibility and limits
Microsoft lists EXACT for Excel for Microsoft 365, Excel 2024, Excel 2021, Excel 2019, and Excel 2016, including the listed Mac editions. This two-cell comparison does not rely on dynamic-array behavior.
EXACT verifies two cell values; it does not identify the differing character, remove spaces, normalize Unicode text, or compare a cell with a whole list of permitted codes. These examples use literal ASCII text. If a FALSE result is unexplained, inspect the source values for nonprinting or Unicode characters rather than expecting EXACT to diagnose them.
A2 contains SKU-Red and B2 contains SKU-red, so =EXACT(A2,B2) returns FALSE even though =A2=B2 returns TRUE. A3 contains Approval-R7 followed by one trailing space and B3 contains Approval-R7, so =EXACT(A3,B3) returns FALSE. If both cells contain an empty string, =EXACT(A1,B1) returns TRUE because the two text values are identical.
If spaces are accidental and the control rule permits removing them, clean the source values before comparing them. Do not automatically trim an approval code when a space may be meaningful, because cleanup changes the value being verified. When this check sits inside a larger formula, use a structured approach to audit a complex Excel formula before changing its references.

Practice with the exact example data
Use a separate blank worksheet for each example. Enter each value at its listed cell address, then type the formula in AA1. Quoted text is shown in JSON notation to preserve spaces: enter the characters inside the quotes, without the quotes, using a leading apostrophe to keep text and spaces literal. An empty quoted string means an explicit empty text value; use an apostrophe entry where appropriate. Compare your result with the expected result below. These are synthetic practice data.
Example 1 — Main case
| Cell | Input value |
|---|---|
| A1 | “Approval-R7” |
| B1 | “Approval-R7” |
Formula in AA1: =EXACT(A1,B1)
Expected result: true
Example 2 — Boundary case
| Cell | Input value |
|---|---|
| A2 | “SKU-Red” |
| B2 | “SKU-red” |
Formula in AA1: =EXACT(A2,B2)
Expected result: false
These examples were checked with a limited calculator supporting numeric aggregates, ASCII text functions, exact criteria and exact first-match XLOOKUP. Only the displayed examples and supported semantics were calculated. They were not executed in Microsoft Excel. This check does not verify every claim in the article.
Synthetic examples are provided for practice. They are not evidence of personal experience, independent human review or execution in Microsoft Excel.
