EXACT Function

Excel 2007+

Summary

The EXACT function compares two text strings and returns TRUE if they are exactly identical, FALSE otherwise. It performs a case-sensitive comparison, making it ideal for validating text entries and ensuring precise string matches in Excel worksheets.

Syntax

EXACT(text1, text2)

Parameters

Parameter Type Required Description
text1 Text Yes First text string for comparison (cell reference, text, or formula result)
text2 Text Yes Second text string for comparison (cell reference, text, or formula result)

Using the EXACT Function

EXACT provides precise text comparison capabilities in Excel. Use it when you need to verify that two text entries are character-for-character identical, including case sensitivity. This function is particularly valuable for data validation, checking user input, and ensuring consistency in text-based lookups.

Common EXACT Examples

Basic Case Sensitivity Check

=EXACT(A2,B2)

Returns TRUE if cells A2 and B2 contain identical text including case, FALSE otherwise.

Space Detection

=EXACT("w ord","word")

Returns FALSE because of the extra space between 'w' and 'ord' in the first string.

Case Mismatch Example

=EXACT("Word","word")

Returns FALSE since 'W' (uppercase) differs from 'w' (lowercase).

Frequently Asked Questions

No, EXACT treats all spaces as significant characters and performs exact matching.

Yes, but numbers are treated as text. Use it with TEXT function for formatted number comparisons.

Common Errors and Solutions

#VALUE! error

Cause: Non-text arguments provided to text parameters

Solution: Ensure both arguments contain or evaluate to text values

Notes

  • EXACT is case-sensitive: 'Apple' ≠ 'apple'
  • Extra spaces are detected: 'hello ' ≠ 'hello'
  • Formatting differences (bold, color) are ignored
  • Use with TRIM and UPPER for case-insensitive comparisons

Compatibility

Available in: Excel 2007, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 2021, Microsoft 365

Not available in:

Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+