EXACT Function in Excel: Case-Sensitive Comparison

EXACT Function in Excel: Case-Sensitive Comparison featured illustration

πŸ“Ž This article includes 1 downloadable practice file ↓

⏱ 2 min readUpdated 5 October 2026

TextLevel: IntermediateAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Example 2
  5. EXACT in practice
  6. Where you will use it
  7. Worked example
  8. Mistakes people make
  9. Related functions
  10. Continue learning

EXACT compares two texts including upper/lower case. A normal =A2=B2 ignores case.

Advertisement

Syntax

=EXACT(text1, text2)
Argument What it means
text1, text2 Texts to compare.

Examples

Example 1

=EXACT(A2, B2)

TRUE only if β€œABC123” matches β€œABC123”, not β€œabc123”.

Example 2

=SUMPRODUCT(--EXACT(A2:A100, "SKU-a"))

Case-sensitive count.

EXACT in practice

Where you will use it

  • Case-sensitive password or code checks
  • Find PAN/GSTIN entered in wrong case
  • Compare two lists exactly

Worked example

ABFormulaResult
ABCDE1234Fabcde1234f=EXACT(A2,B2)FALSE
PunePune=EXACT(A3,B3)TRUE
Pune Pune=EXACT(A4,B4)FALSE

Results calculated in Excel.

Mistakes people make

MistakeWhat to do instead
Using = for case checks=A2=B2 ignores case; EXACT doesn't
Trailing spacesEXACT sees them; TRIM first

UPPER Β· FIND Β· COUNTIF

πŸ“š Part of the free Excel course: Beginner β†’ Expert Β· Try it in the Formula Lab or ask the AI Helper.

⚑ Interactive Practice Lab & Formula Tester:

Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.

πŸ“Ž Practice files for this article

  • πŸ“—
    Practice workbook: Text & cleaning24 tasks on realistic sales data β€” type your formula, the Check column turns green when it is right. Answers sheet included.
    ⬇ XLSX Β· 35 KB

Free to use for learning. Files with macros (.bas) are plain text β€” import them with Alt+F11 β†’ File β†’ Import File, and always test on a copy.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free Β· AI can be wrong

Leave a Reply

Your email address will not be published. Required fields are marked *