EXACT function. compares if two strings are the same.(Microsoft Excel)

05/24/2023

Japanese version.

The EXACT function compares two strings and returns TRUE if they match, Otherwise, it returns FALSE.

This section describes the specifications of the function and how it differs from a comparison using = (equals).

How it works

=EXACT(text1,text2)
NameOmissionExplanation
text1 - 2Required argument.Specify the string to be compared.

To return a Boolean value (TRUE or FALSE) as a result It is mainly used in conjunction with IF functions.

Demonstrate

It works in the same way as a comparison by =(equal), but The results are different in the following cases.

CaseDifference
"Character numbers" and "Numeric values".= : If the data type is different, it is judged as different.

EXACT function : If the numbers are the same, it is judged to be the same.
Upper and lower case alphabetical characters.= : Not case sensitive.

EXACT function : Case sensitive.
  • Empty cells have the same result.
  • The numbers are the same result to each other.
  • The numerical value 1 and the character "1" are different results.
  • A "1" and a zero-filled "1" are FALSE in all cases.
  • EXACT is case sensitive.
Example of execution results.

If the comparison does not work

One of the cells may contain invisible characters.

In that case, use the LEN function to check if the number of characters is the same, or use the CLEAN function to remove special characters before comparing.

Spill

Spill if the parameters is a cell range.

---

Links

Microsoft Excel Functions Text