# How to Count Cells Not equal to X or Y in Excel

This post will guide you how to count the number of cells not equal to criteria X or Y in a given range cells using a formula in Excel 2013/2016.You can easily to count cells equal to or not equal to a specific value through COUNTIF function. But if there is an easy way to count cells not equal to either one value or another value in a selected range of cells in Excel.

## Count Cells Not equals to Criteria X or Y

Assuming that you want to count cells that do not contain value “EXCEL”or “word” defined in a selected range(A1:B6).In this case, you can use the COUNTIFS function with multiple criteria to count cells not equal to “EXCEL” or “word”.

Enter the following formula in a blank cell, and press Enter key:

=COUNTIFS(A2:A6,”<>EXCEL”,A2:A6,”<>word”) Note: A2:A6 is the data range that you want to use. And both“EXCEL” and “word” are the text values that you want to count in range A2:A6. You need to change them as you need.

Now Let’s see how this formula works:

The COUNTIFS function will count the number of cells in a given range that match supplied criteria. All criteria must match while counting. In the above formula, there are two criteria. One criteria is “<>EXCEL”, it means if cell is not equal to “, another is “<>word”, it means that cells should not equal to “word”.

You can also use another array formula to achieve the same result of counting cells not equal to either “EXCEL” or “word” in A2:A6. Just using the following formula based on the SUMPRODUC function:

=SUMPRODUCT((A2:A6<>”EXCEL”)*(A2:A6<>”word”)) ### Related Functions

• Excel SUMPRODUCT function
The Excel SUMPRODUCT function multiplies corresponding components in the given one or more arrays or ranges, and returns the sum of those products. The syntax of the SUMPRODUCT function is as below:= SUMPRODUCT (array1,[array2],…)…
• Excel COUNTIFS function
The Excel COUNTIFS function returns the count of cells in a range that meet one or more criteria. The syntax of the COUNTIFS function is as below:= COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…)…

Related Posts

VBA Macro For VLOOKUP From Another Sheet

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 how to use VBA code to vlookup data ...

How To Insert Comments in Protected Worksheet in Excel

This post will show you how to allow comments in a protected worksheet in Excel. You can easily to insert comments into cells in a normal worksheet in Excel, but if want to insert a comment in a worksheet that ...

How To Convert Text to Upper Cases(Using VBA) in Excel

This post will show you how to switch from lower case to upper case in Excel. and I am going to show you two different ways of converting text to upper cases using formula or VBA macro in Excel 2013,Excel ...

How To Hide Every Other Row in Excel (Using VBA)

This post will show you how to hide alternate rows or columns in Excel or how to hide every third, fourth, fifth row or column in Excel. If you want to hide every other row in your current worksheet, how ...

How to Disable the Save As Prompt in Excel

This post will show you how to use a VBA Macro to save an Excel file and overwrite any existing file without a prompt so that you are going to get the little window that says file already exists do ...

How to Count Cells that Contain even or odd numbers in Excel

This post will guide you how to count the number of cells that contain odd or even numbers within a range of cells using a formula in Excel 2013/2016.How do I count cells that contain odd numbers through the use ...

How to Count Cells that Contain negative Numbers in Excel

This post will guide you how to count the number of cells that contain negative numbers within a range of cells using a formula in Excel 2013/2016.You can count the number of negative numbers in your data using easy functions ...

How to Count Cells Are Not Blank or Empty in Excel

This post will guide you how to count cells that are not blank or empty in a given range cells using a formula in Excel 2013/2016.How do I count the number of cells that are not blank in a particular ...

How to Count Cells Less Than a Specific Value in Excel

This post will guide you how to count the number of cells less than a particular numeric value in a given range cells using a formula in Excel 2013/2016. How do I count cells that are less than a specific ...

How to Count Cells Greater Than a Specific Value in Excel

This post will guide you how to count the number of cells greater than a particular numeric value in a given range cells using a formula in Excel 2013/2016. How do I count cells that are greater than a specific ...

Sidebar