Compare two strings in excel and highlight differences
- how to compare string in excel
- how to compare string in excel if condition
- how to compare strings in excel vba
- how to match string in excel
Excel compare two strings for similarity.
Compare Text in Excel
This example shows two ways to compare text strings in Excel. One is case-sensitive and one is case-insensitive.
1.
Excel string contains
Use the EXACT function (case-sensitive).
Explanation: the string "Frog" in cell A1 and the string "frog" in cell B1 are not exactly equal to each other (first letter in uppercase and first letter in lowercase).
2.
Use the formula =A1=B1 (case-insensitive).
Explanation: this formula ignores lowercase and uppercase differences. As a result, the first six formulas return TRUE.
3. Add the IF function to replace TRUE and FALSE with a word or message.
Excel string compare case-insensitiveThe formula below uses the EXACT function (see step 1).
4. Do you want to compare two or more columns by highlighting the differences in each row? Visit our page about Row Differences.
- how to check string in excel
- how to compare two strings in excel and highlight differences