Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Let's say you want to find text that begins with a standard company prefix, such as ID_ or EMP-, and this text must be in uppercase letters. There are several ways to check if a cell contains text and the case of the text matters to you.

Compare one cell to another cell

To do this task, use the EXACT function.

Note: EXACT is case-sensitive but ignores formatting differences.

An example using the EXACT function to compare one cell to another

Compare one value to a list of values

To do this task, use the EXACT and OR functions.

An example using OR and EXACT functions to compare one value to a list of values

Note: If you have a current version of Microsoft 365, then you can simply enter the formula in the top-left-cell of the output range, then press ENTER to confirm the formula as a dynamic array formula. Otherwise, the formula must be entered as a legacy array formula by first selecting the output cell, entering the formula in the output cell, and then pressing CTRL+SHIFT+ENTER to confirm it. Excel inserts curly brackets at the beginning and end of the formula for you. For more information on array formulas, see Guidelines and examples of array formulas.

Check if part of a cell matches specific text

To do this task, use the IF, FIND, and ISNUMBER functions.

Note: The FIND function is case-sensitive.

An example using IF, ISNUMBER, and FIND functions to check if a part of a cell matches specific text

The formula in the above screenshot uses the following arguments.

Formula to check for text

Formula to check for text

  1. search_for: What you want to check for.

  2. to_search: The cell that contains the text that you want to check.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×