Exact
Syntax:¶
EXACT(text1, text2)
- text1: The first text string to be compared.
- text2: The second text string to be compared.
Description:¶
The EXACT function in Excel is used to compare two text strings to determine if they are exactly the same. The
function is case-sensitive and checks for both character matches and capitalization.
It is particularly useful when you want to validate data and ensure uniformity, especially when managing case-sensitive data such as passwords or IDs.
For example:
EXACT(text1, text2) = TRUE or FALSE
Examples:¶
=EXACT("Hello", "Hello")would returnTRUE, because the text strings are identical in both content and case.=EXACT("Data", "data")would returnFALSE, because the function is case-sensitive, and "D" is not the same as " d".=EXACT("123", "123 ")would returnFALSE, because the second text string contains an additional space character.=EXACT("Excel", "excel")would returnFALSE, because "E" (uppercase) is not the same as "e" (lowercase).=EXACT("TEXT", "TEXT")would returnTRUE, since both strings are identical and in the same case.
Notes:¶
- The
EXACTfunction is case-sensitive, which means that "ABC" is not the same as "abc". - It is often used to validate user inputs, match case-sensitive strings, or detect differences in data.
- If both text strings are exactly the same, the function returns
TRUE. Otherwise, it returnsFALSE. - The function can compare text, numbers, and special characters, but it does not ignore extra spaces or hidden characters.
- If either of the arguments is empty, the result would be
FALSE(e.g.,=EXACT("Text", "")).