Summary
The Excel EXACT function compares two text strings and returns TRUE if they are exactly the same, and FALSE otherwise. This function is case-sensitive, making it useful for precise text comparisons.
Syntax
=EXACT(text1, text2)
- text1: The first text string to compare.
- text2: The second text string to compare.
Return value
TRUE if the two strings are identical (including case), FALSE otherwise.
How to use
EXACT is primarily used in scenarios where precise text comparison is required, including case sensitivity, such as password checks, data validation, or when distinguishing between similar-looking data entries.
Examples
Simple EXACT
Comparing Two Text Strings: To compare text in two cells for exact match:
=EXACT(A1, B1)
If A1 is “Hello” and B1 is “hello”, the formula returns FALSE due to case difference.
EXACT for Case-Sensitive Validation
Case-Sensitive Data Validation: Ensuring exact match in user inputs:
=EXACT("Password", C2)
This can be used to validate a case-sensitive password entry in cell C2.
EXACT with Logical Tests
Combining EXACT with Logical Functions: Incorporating EXACT in logical tests:
=IF(EXACT(E2, "Yes"), "Proceed", "Stop")
This formula returns “Proceed” if E2 is exactly “Yes”, and “Stop” otherwise.
Additional Notes
- EXACT is strictly case-sensitive, unlike most other Excel text functions.
- Useful in situations where the difference in uppercase and lowercase letters is crucial.
- Often combined with other functions for more sophisticated data validation and analysis.