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

Data Analysis

  • Excel Pie Chart
  • Add Outline to Data in Excel
  • How to Create Area Chart in Excel
  • How to do a t-Test in Excel?
  • Get column index in Excel Table

References

  • How to use Excel COLUMN Function
  • How to use Excel MMULT Function
  • Extract data with helper column in Excel
  • How to get last row in numeric data in Excel
  • Count unique text values with criteria

Data Validations

  • How To Create Drop-down List in Excel
  • Excel Data validation exists in list
  • Excel Data validation don’t exceed total
  • Excel Data validation date in next 30 days
  • Prevent invalid data entering in specific cells

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

  • Check multiple cells are equal in Excel
  • Nested IF function example in Excel
  • How to use Excel XOR Function
  • How to use Excel FALSE Function
  • IFERROR function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • How to calculate next scheduled event in Excel
  • How to calculate working days left in month in Excel
  • Display Date is workday in Excel
  • How to get number of days, weeks, months or years between two dates in Excel
  • Get days before a date in Excel

Grouping

  • How to randomly assign data to groups in Excel
  • Map inputs to arbitrary values in Excel
  • How to randomly assign people to groups in Excel
  • Group numbers at uneven intervals in Excel
  • Group times into unequal buckets in Excel

General

  • Cell References: Relative, Absolute and Mixed Referencing Examples
  • Subtotal by color in Excel
  • How to Create Calendar in Excel
  • Count cells less than in Excel
  • Count cells that do not contain errors in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning