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

Data Analysis

  • Move chart to a separate worksheet in Excel
  • How To Compare Two Lists in Excel
  • How to Create Gantt Chart in Excel
  • Managing Conditional Formatting Rules in Excel
  • Understanding Anova in Excel

References

  • How to get address of named range in Excel
  • Last row number in range
  • How to use Excel ROW Function
  • Extract data with helper column in Excel
  • How to get last row in text data in Excel

Data Validations

  • Excel Data validation require unique number
  • Excel Data validation allow uppercase only
  • Excel Data validation with conditional list
  • Excel Data validation must not contain
  • Excel Data validation exists in list

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

  • IF, AND, OR and NOT Functions Examples in Excel
  • IF with boolean logic in Excel
  • Complete List of Excel Logical Functions, References and Examples
  • OR function: Description, Usage, Syntax, Examples and Explanation
  • NOT function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Convert date to text in Excel
  • Get day from date in Excel
  • Next biweekly payday from date in Excel
  • Display Days in month in Excel
  • How to calculate Quarter of Date in Excel

Grouping

  • Group times into 3 hour buckets in Excel
  • Group numbers at uneven intervals in Excel
  • Map inputs to arbitrary values in Excel
  • Map text to numbers in Excel
  • Running count group by n size in Excel

General

  • Excel Default Templates
  • Excel Operators
  • How to count total columns in range in Excel
  • Hide and Unhide Columns or Rows in Excel
  • Sum by group in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning