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

ArgumentRequired?What it does
text1YesThe first text.
text2YesThe second text.

Examples

Example 1 — Case-sensitive codes

Northstar's discount codes are case-sensitive. Check what customers typed.

C2fx=EXACT(A2, B2)
ABC
1CodeTypedValid?
2SPRING26SPRING26TRUE
3SPRING26spring26FALSE
4VIPx7VIPX7FALSE
=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

  • Formatting is ignored; only the values are compared.
  • Related functions: FIND, UPPER, LOWER.
Kyle Stott

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.