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

Data Analysis

  • How to add Trendline to a chart in Excel
  • How to Sort by Color in Excel
  • How To Create Frequency Distribution in Excel
  • Conditional Formatting Color Scales Examples in Excel
  • Conditional Formatting Rules in Excel

References

  • How to use Excel FORMULATEXT function
  • Approximate match with multiple criteria in Excel
  • Last row number in range
  • Extract all partial matches in Excel
  • Two-column Lookup in Excel

Data Validations

  • Excel Data validation no punctuation
  • Excel Data validation don’t exceed total
  • Excel Data validation date in next 30 days
  • How To Create Drop-down List in Excel
  • Excel Data validation require unique number

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

  • IFNA function: Description, Usage, Syntax, Examples and Explanation
  • Extract multiple matches into separate rows in Excel
  • IFS function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel OR Function
  • Invoice status with nested if in Excel

Date Time

  • Count day of week between dates in Excel
  • How to calculate next scheduled event in Excel
  • Convert Excel time to decimal hours in Excel
  • Get first Monday before any date in Excel
  • Roll back weekday to Friday base on a particular date in Excel

Grouping

  • Calculate conditional mode with criteria in Excel
  • Running count group by n size in Excel
  • Group arbitrary text values in Excel
  • Group numbers at uneven intervals in Excel
  • Categorize text with keywords in Excel

General

  • Share Excel data with Word documents
  • How to set or clear a print area in Excel Worksheet
  • Freeze and Unfreeze Panes in Excel
  • How to Insert Cells, Row and Rows in Excel
  • How to calculate percent of students absent in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning