How to exactly compare two strings (case sensitive) in Excel?
For comparing two strings considering case sensitive, the formula in this article can help you.
Recommended Excel Productivity Tools
As below screenshot shown, you need to compare strings in column A and B considering case sensitive in Excel. Please do as follows.
Formula: =EXACT(text1, text2)
1. Select the blank cell C2, enter formula =EXACT(A2, B2) into the Formula Bar, then press the Enter key. See screenshot:
2. Keep selecting cell C2, drag the Fill Handle down to the cells to get all results.
1. If the cell returns the TRUE result, it means that the compared strings are exactly matched. Otherwise, they are different.
2. If you want to generate your own results such as Yes and No instead of TRUE and FALSE. Please change the formula =EXACT(A2, B2) to =IF(EXACT(A2,B2),"Yes","No"). See screenshot:
- How to compare two columns and highlight the unmatched data in Excel?
- How to compare two strings for similarity or highlight differences in Excel?