Excel if cell contains partial text

Here is the Excel formula to Check If Cell Contains Partial Text. You can se this formula to determine the cell contains partial text and Count, Sum and do further processing.

Excel if cell contains partial text

Below Formula will check if cell contains partial text. It will return ‘Yes’ if it contains the partial text, ‘No’ if not found.

=IF(COUNTIF(A2,"*PartialText*"),"Yes","No")

This formula will check for the partial text in cell A2 and returns ‘Yes’ if found, returns ‘No’ if not found. You can return True, False if required as shown in the given formula.

=IF(COUNTIF(A2,"*PartialText*"),TRUE,FALSE)

Excel if cell contains partial text wildcard

Following are the useful wildcards to help in matching the partial text in excel formulas, and very useful to check if a cell contains partial text in Excel.

Asterisk (*)

You can use Asterisk (*) to match zero or more characters. Check the examples below:

  • 1. Formula to check Excel if cell contains partial text, which should end with partial text
    =IF(COUNTIF(A2,"*PartialText"),TRUE,FALSE)

Here, * is the wildcard character preceding to the partial text.

  • 2. Formula to check Excel if cell contains partial text, which should begins with partial text
    =IF(COUNTIF(A2,"PartialText*"),TRUE,FALSE)

Here, * is the wildcard character following the partial text.

  • 3. Formula to check Excel if cell contains partial text, which contains the partial text at any position in the cell
    =IF(COUNTIF(A2,"*PartialText*"),TRUE,FALSE)

Here, * is the wildcard character following and preceding to the partial text.

Question mark (?) – one character

You can use Question mark (?) to match any one character. Check the examples below:

  • 4. Formula to check Excel if cell contains partial text, cell should end with partial text and only preceding any one character.
    =IF(COUNTIF(A2,"?PartialText"),TRUE,FALSE)
  • 5. Formula to check Excel if cell contains partial text, cell should begin with partial text and followed by any 3 character.
    =IF(COUNTIF(A2,"PartialText???"),TRUE,FALSE)
  • Share This Story, Choose Your Platform!

    Leave A Comment

    Excelx.com is a Excel Blog by PNRao to provide latest tips of Excel and help you to Quickly Learn and up-to date with Excel Concepts. We help you to know – how to do things in Excel with Clean and Easy Excel Tips, Shortcuts, Reference, Tutorials and New and Quick Tricks and Methods.

    We Provide Free Online Tutorials, Formulas, Templates, Dashboards and Macros to excel in Microsoft Excel. We cover basic to advanced concepts and share creative ideas, Excel tips and Shortcuts with Related Example Files. You Can refer verity of examples covered on latest tools and techniques in Microsoft Excel Applications.

    Related Posts