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.
Exactly compare two strings (case sensitive) with formula
Exactly compare two strings (case sensitive) with formula
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.
Notes:
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:
Related articles:
- How to compare two columns and highlight the unmatched data in Excel?
- How to compare two strings for similarity or highlight differences in Excel?
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
