How to Count Cells that do not Contain Specific Text in Excel

In the previous post, we talked that how to count cell that contain certain text using the COUNTIF function in Excel.

This post will guide you how to count the number of cells that do not contain specific text within a range of cells using a formula in Excel 2013/2016 or Excel office 365. How do I count the number of cells without certain text using a simple formula in Excel. When you analyze a large list of data, you may also want to know that how many cells that do not contain specific text. The below steps will show you how to do it in a simple way.

Count Number of Cells that do Not Contain Specific Text


You can use the COUNTIF function to count cells that do not contain certain text. And you also need to supply the target text string in the criteria argument in the COUNTIF function.

The below is a generic formula to count the number of cells that do not contain specific text:

=COUNTIF(range,criteria)

Assuming that you have a list of data in range B1:B6 and you want to count the number of cells without a certain text “exc”. And you can type this string in the second argument as its criteria and you will get the below formula:

=COUNTIF(B1:B6,”<>*exc*”)

count cells do not contain text1

LET’S SEE THAT HOW THIS FORMULA WORKS:

The COUNTIF function can be used to count the number of cells that match a single condition or criteria. And in this case, you need to provide a criteria as “<>*exc*”, which is evaluated as “values that do not contain ‘exc’ in any position”. Then the total count of all cells in the range B1:B6 that meet the above criteria is returned.

Note: the asterisk(*) means that it will match any number of characters in the above formula. If you just only supply a certain string “exc”, it means that cells must contain exactly “exc”. If the cell contains any other characters, it will not be counted. So you need to use the asterisk character as a wildcard in the second criteria argument.

The “<>” operator means that does not equal to a certain value, so the above formula can be used to count any cell that does not contain “exc” in any position in cells.

Related Functions


  • Excel COUNTIF function
    The Excel COUNTIF function will count the number of cells in a range that meet a given criteria. This function can be used to count the different kinds of cells with number, date, text values, blank, non-blanks, or containing specific characters. etc. = COUNTIF (range, criteria) …

 

x
How to Remove Line Breaks Carriage Returns in Excel
 

Related Posts

If Cell is This Value or That Value

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the result of logical test. If you want to see if a cell is A or B, and if one of ...

If Value is Greater Than A Certain Value
If Value is Greater Than A Certain Value 1

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the logical test result. If you want to see if a value in one cell is greater than a specific value, ...

If Cell is Not Blank
If Cell is Not Blank 6

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the result of created logical test. If you want to see if a cell is blank or not, and leave some ...

If Cell is Blank
If Cell is Blank_1

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the result of created logical test. If you want to see if a cell is blank or not, and leave some ...

If Cell Equals Certain Text String
If cell equals certain text_1

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the result of created logical test. If you want to see if cell equals a certain text string like “Win”, you ...

If Cell Contains Either Text1 or Text2
If cell contains text1 or text2_1

IF function is frequently used in Excel worksheet to return “true value” or “false value” based on the logical test result. If you want to see if cell contains certain substring1 like “abc” or substring2 like “def”, and returns true ...

If Cell Contains Certain Text OR Equals Certain Text

IF cell equals certain text IF function is frequently used in Excel worksheet to return “true value” or “false value” based on the logical test result. If you want to test values to see if they equal certain text like ...

VLOOKUP From Another Sheet Not Working
vlookup from another sheet not working3

In the previous post, you should know that how to fix or remove the #N/A error when using VLOOKUP formula to lookup value from another sheet. And this post will show you reasons why your VLOOKUP formula is not working ...

If Cell Begins with One of Three Supplied Characters
If Cell Begins with One of Three Supplied Characters

If you want to test values to see if they begin with some given specific characters like “x”, ”y”, or “z”, you can create a formula with COUNTIF and SUM functions to return results. EXAMPLE You can see “TRUE” or ...

Fix #N/A Error For VLOOKUP From Another Sheet
vlookup from anther sheet not working1

This post will show you how to fix the #N/A error why it occurs when you extract values from another sheet using VLOOKUP function in Excel 2016,2013,2010 or other Excel versions. How can you correct a #N/A error in VLOOKUP ...

Sidebar