Formula Guide

The Excel EXACT Function
explained simply

EXACT compares two text strings and returns TRUE only if they match exactly, including capitalization — unlike the = operator, which ignores case.

ExcelPro · 3 min read · Updated June 2026
Contents
  1. What does EXACT do?
  2. Syntax
  3. 3 examples
  4. Common mistakes
  5. FAQ

What does EXACT do?

EXACT compares two pieces of text and returns TRUE only if they are identical character-for-character, including uppercase versus lowercase letters.

This matters because Excel's regular = comparison treats "Apple" and "apple" as equal — EXACT is the only built-in way to tell them apart.

Syntax

=EXACT(text1, text2)
ArgumentDescription
text1 requiredThe first text or cell to compare.
text2 requiredThe second text or cell to compare.

Examples

Example 1
Case-sensitive comparison
=EXACT("Apple","apple")

Returns FALSE — the capital A makes these different under EXACT, even though = would call them equal.

Example 2
Compare two cells exactly
=EXACT(A2,B2)

Useful for spotting data that looks the same but was typed with inconsistent capitalization.

Example 3
Validate an exact code match
=IF(EXACT(A2,"PRD-001"),"Match","No match")

Confirms a product code matches exactly, case included — useful for codes where case carries meaning.

Common mistakes

⚠️ Assuming = and EXACT behave the same

=A1=B1 ignores case differences entirely. Only EXACT catches them.

FAQ

Does EXACT ignore leading/trailing spaces?
No — spaces count too. Combine with TRIM first if stray spaces should not affect the comparison.

Practise Excel with real data

ExcelPro has 700+ hands-on Excel exercises across 7 career tracks — free to start, no download needed.

Start practicing free →

Related formulas

TRIM FIND