How to Compare Strings in Google Sheets (with Example)

Video google sheet string compare

Hey there, besties! Are you struggling to compare strings in Google Sheets? Well, worry no more because I’ve got your back! In this article, I’ll walk you through two methods to compare strings in Google Sheets and show you examples of how to use them. So, let’s dive in!

Method 1: Comparing Strings (Case-Sensitive)

To compare strings in Google Sheets while considering the case, you can use the following formula:

=EXACT(A2, B2)

This formula will return TRUE if both strings are identical, including the case. Otherwise, it will return FALSE. Simple, right?

Method 2: Comparing Strings (Case-Insensitive)

Now, if you want to compare strings without worrying about the case, you can use this formula:

=EXACT(UPPER(A2), UPPER(B2))

This formula will return TRUE if both strings are identical, regardless of the case. Again, if they are not the same, it will return FALSE.

Alright, now that we know the formulas, let’s see how they work in action!

compare strings in Google Sheets

Example 1: Comparing Strings (Case-Sensitive)

Let’s say we have two strings in cells A2 and B2, and we want to check if they are identical, considering the case. In cell C2, we can type the following formula:

=EXACT(A2, B2)

We can then drag the formula down to fill the remaining cells in column C.

compare strings in Google Sheets

The formula in column C will return TRUE only if the characters and case of each string are identical. If not, it will return FALSE.

For example:

  • “Panda” and “panda” have the same characters but different cases, so the formula returns FALSE.
  • “Lion” and “lion” have the same characters and the same case, so the formula returns TRUE.

Got it? Let’s move on to the next example!

Example 2: Comparing Strings (Case-Insensitive)

In this example, we’ll compare strings without caring about the case. In cell C2, we can type the following formula:

=EXACT(UPPER(A2), UPPER(B2))

Again, we can drag the formula down to fill the remaining cells in column C.

compare strings in Google Sheets

The formula in column C will return TRUE if the characters of each string are identical, regardless of the case. Otherwise, it will return FALSE.

Note that this formula uses the UPPER function to convert each string to uppercase before comparing the characters. This ensures a case-insensitive comparison.

And there you have it! You now know how to compare strings in Google Sheets using two different methods.

Wrap Up

Comparing strings in Google Sheets can be a breeze with the right formulas. Whether you need a case-sensitive or case-insensitive comparison, you now have the tools to do it with confidence.

If you want to explore more Google Sheets tips, tricks, and tutorials, head over to Crawlan.com for all your data-crunching needs.

Happy comparing, besties!

Image Source: Google Sheets Data

Related posts