Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to do a t-Test in Excel?
  • Excel Frequency Function Example
  • Remove Duplicates Example in Excel
  • How to calculate correlation coefficient Correlation in Excel
  • How to Sort by Color in Excel

References

  • Extract all partial matches in Excel
  • How to get last row in mixed data with blanks in Excel
  • How to use Excel ROWS Function
  • How to use Excel COLUMN Function
  • Offset in Excel

Data Validations

  • Excel Data validation no punctuation
  • Excel Data validation allow uppercase only
  • Excel Data validation exists in list
  • Excel Data validation with conditional list
  • Excel Data validation whole percentage only

Count cells not equal to x or y in Excel

by

This tutorial shows how to Count cells not equal to x or y in Excel using the example below;

Formula

=COUNTIFS(range,"<>x",range,"<>y")

Explanation

To count cells not equal to this or that, you can use the COUNTIFS function with multiple criteria.

In the example shown, there is a simple list of colors in column B. There are 6 cells total with a color, and a few are duplicates.

To count the number of cells that are not equal to “red” or “blue”, the formula in E6 is:

=COUNTIFS(rng,"<>red",rng,"<>blue")

In this example “rng” is a named range that equals B6:B11.

How this formula works

The COUNTIFS function counts cells that meet one or more conditions. All conditions must pass in order for a cell to be counted.

The key in this case is to use the “not equals” operator, which is <>.

To add another criteria, simply add a another range / criteria pair of arguments.

Alternative with SUMPRODUCT

The SUMPRODUCT function can also count cells that meet multiple conditions.

For the above example, the syntax for SUMPRODUCT is:

=SUMPRODUCT((range<>"blue")*(range<>"green"))

Post navigation

Previous Post:

How to use Excel CHOOSE Function

Next Post:

Customize Ribbon In Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • How to use IFS function in Excel
  • How to use Excel XOR Function
  • TRUE function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel FALSE Function
  • IFNA function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Get month name from date in Excel
  • Convert decimal hours to Excel time
  • Steps to create Dynamic calendar grid in Excel
  • Excel Date & Time Functions Example
  • YEAR function: Description, Usage, Syntax, Examples and Explanation

Grouping

  • Map inputs to arbitrary values in Excel
  • Calculate conditional mode with criteria in Excel
  • How to randomly assign people to groups in Excel
  • Map text to numbers in Excel
  • If cell contains one of many things in Excel

General

  • How to generate random times at specific intervals in Excel
  • How to fill cell ranges with random text values in Excel
  • How to count total number of cells in a rectangular range in Excel
  • Creating and Opening an existing file in Excel
  • How to generate random number between two numbers in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning