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.
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
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?