Skip to main content

EXACT

The EXACT function compares two strings and returns TRUE if they are exactly the same, FALSE otherwise.

The function is case-sensitive but ignores formatting differences.

This function can be useful when you need to quickly check whether two values match completely and accurately, including case sensitivity and all available spaces.

Syntax​

EXACT(string1, string2)

ArgumentDescriptionPermitted values
string1First string for comparisonText string or reference to a cell containing text
string2Second string for comparisonText string or reference to a cell containing text

Examples of use​

Comparing two identical strings

=EXACT("Hello", "Hello")

This formula will return TRUE, since the strings are identical.

Comparing strings with different case

=EXACT("Hello", "Hello")

This formula will return FALSE, as the case of the letters differs.

Comparing strings with spaces

=EXACT("Test ", "Test")

This formula will also return FALSE, as there is a space at the end of the first string.

Notes​

  • If you don't need to take case into account, you can use a simple comparison with the “=” operator.
  • This function is case-sensitive. This means that “Test” and “test” will be considered different strings.