Excel compare two or more text strings
Posted on: 04/20/2021
To compare two text strings in Excel, you can use the EXACT Function, or you can use =A1=B1. The EXACT function checks for case sensitivity. Example "Chris" is not the same as "CHRIS" if you use the EXACT function. With =A1=B1, Chris would appear as the same or TRUE.
EXACT function
The Excel EXACT function compares two text strings, taking into account upper and lower case characters. If the text strings are the same, EXACT returns TRUE. If they are not the same, EXACT returns FALSE. EXACT is case-sensitive.
=EXACT(text1,text2)
Example of = and EXACT
=A1=B1 will return TRUE. It is not case sensitive. =EXACT(A1,B1) will return FALSE. It is case sensitive.Cell D2 in the screenshot above is using the EXACT Function. If you want to compare three or more cells, you can use EXACT Function with the AND function.
YouTube video
Excel chart articles
-
Excel Charts - three methods for filtering Chart Data
Filtering data in Excel charts is easy to do. The method you use should be based on the amount of data you have. In this video, I show three methods of filtering chart data. Method 1 is using Chart Filters. This is the easiest method.
-
Three tips for getting started with Excel Charts
Charts in Microsoft Excel are easy. This short video shows three tips for creating charts. I'll cover two keyboard shortcuts for making charts, using Recommend Charts, and creating charts using Quick Analysis.
Video Chapters:
-
00:00 Introduction
-
00:34 Case-insensitive compare
-
01:08 Trim spaces either side of strings
-
01:47 Case-sensitive compare
-
03:10 Case-insensitive multi-compare
Using AND and EXACT for multiple text strings
To compare multiple text strings, use =AND(A15:D15=A15) to compare if you dont' care about case sensitivity, and use EXACT for case sensitivity.=AND(EXACT(A15:D15,A15))
See the screenshot below.
Chris Menard
Chris Menard is a Microsoft Trainer (MCT) and works as a full-time Trainer at BakerHostetler - one of the largest law firms in the US. Chris runs a YouTube channel with 900+ technology videos that cover various tools such as Excel, Word, Zoom, Teams, Gmail, Copilot, Google Calendar, and Outlook. To date, the channel has helped over 20 million viewers.
Menard also does 2 to 3 public speaking events yearly, presenting at the Administrative Professional Conference (APC), the EA Ignite Conference, the University of Georgia, and CPA conferences. You can connect with him on LinkedIn at https://chrismenardtraining.com/linkedin or watch his videos on YouTube at https://chrismenardtraining.com/youtube.
Categories