EXACT Function
Checks whether two text values are identical, including capital letters.
Category
Text
Available in
All versions, Microsoft 365
Returns
TRUE or FALSE
Want to practice EXACT in a real spreadsheet? Open a blank sheet in our Practice Sandbox and try it with live data, with the AI Excel tutor beside you. No Excel needed — just a free account.Try it free in the Sandbox
Overview
Excel's = comparison ignores case: "ns1042" equals "NS1042". EXACT doesn't — it returns TRUE only when every character, including case, matches.
Use it for case-sensitive codes, passwords or anywhere capitals carry meaning.
Syntax
=EXACT(text1, text2) Explain
Arguments
| Argument | Required? | What it does |
|---|---|---|
| text1 | Yes | The first text. |
| text2 | Yes | The second text. |
Examples
Example 1 — Case-sensitive codes
Northstar's discount codes are case-sensitive. Check what customers typed.
C2fx=EXACT(A2, B2)
| A | B | C | |
|---|---|---|---|
| 1 | Code | Typed | Valid? |
| 2 | SPRING26 | SPRING26 | TRUE |
| 3 | SPRING26 | spring26 | FALSE |
| 4 | VIPx7 | VIPX7 | FALSE |
=EXACT(A2, B2) Explain
Example 2 — Case-sensitive lookup
Find the exact-case match in a list.
=XLOOKUP(TRUE, EXACT(A2, Codes[Code]), Codes[Discount]) Explain
Common mistakes
- Spaces count too. "VIP " and "VIP" aren't exact matches. TRIM both sides first if spaces don't matter.
Notes

Author
Kyle Stott
Certified Microsoft Excel Expert
Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.