
Compares two text strings and returns TRUE only when they match exactly, including letter case.
The Excel EXACT function compares two text values and returns TRUE only when they match exactly. That includes uppercase and lowercase letters, spaces, and punctuation.
EXACT is different from the normal = comparison. In Excel, ="Apple"="apple" returns TRUE because the standard comparison ignores case. EXACT does not ignore case.
That makes EXACT especially useful in validation work. If a code must be entered in one precise form, EXACT can enforce the rule more clearly than a normal comparison that quietly treats uppercase and lowercase letters as the same.
Returns TRUE only when both text values match completely.
Returns a logical result that can be used directly or inside another formula.
=EXACT(text1, text2)
text1 and text2 are the two values you want to compare. Both arguments are required.
EXACT fills a specific gap: it gives you a case-sensitive text comparison. Most other common comparison tools in Excel are case-insensitive by default.
| Method | Case-Sensitive? | Use When |
|---|---|---|
EXACT |
Yes | Letter case must match exactly |
= |
No | Case does not matter |
FIND |
Yes | You need a case-sensitive position search rather than a full comparison |
EXACT is useful when case carries meaning. That can happen in revision codes, imported identifiers, passwords, or validation checks where "REV-A" should not be treated as the same as "rev-a".
If two values look the same but EXACT still returns FALSE, the problem may be an extra space or another hidden character. In that case, trimming or cleaning the text before comparison can help.
This example shows the main reason EXACT exists. The normal comparison ignores case, while EXACT does not.
="Excel"="excel" // TRUE
=EXACT("Excel","excel") // FALSE
In cell C1, use EXACT to compare two text values that differ only by case.
EXACT works the same way with cell references. If even one letter differs in case, the result is FALSE.
=EXACT(A2,B2)
// "Pass123" vs "pass123" -> FALSE
In cell C2, use EXACT to compare the two case-sensitive text rows.
Wrapping EXACT inside IF can make the result easier to scan in a worksheet. This is useful in review or validation columns.
=IF(EXACT(A3,B3), "Match", "Different")
In cell C3, use EXACT inside an IF to show "Match" or "Different" when comparing A3 with B3.
EXACT can compare a cell against a required text value when the case must match exactly.
=EXACT(A4, "REV-A")
// TRUE only if A4 contains exactly "REV-A"
In cell B4, use EXACT to check if A4 equals exactly "REV-A".
EXACT is often enough for one-to-one checks, but case-sensitive counting needs a different pattern such as SUMPRODUCT with EXACT.
EXACT is the comparison function to use when letter case matters. This lesson showed that normal Excel comparisons can treat uppercase and lowercase as the same, but EXACT does not, so it is better for codes, revision labels, and other text that must match exactly.
The function is simple, but the use case is important. If the result surprises you, the issue is often extra spaces or hidden characters rather than the letters themselves. In those cases, pairing EXACT with cleanup functions can make the check much more reliable.
EXACT compares two text values with case sensitivity.=EXACT(text1, text2).= comparison does not: it respects letter case.Tell your friends about this post