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

Data Analysis

  • How to Create Area Chart in Excel
  • Subtotal function in Excel
  • How To Create Pareto Chart in Excel
  • How to create Checklist in Excel
  • How to calculate average last N values in a table in Excel

References

  • Extract all partial matches in Excel
  • How to use Excel TRANSPOSE Function
  • Last row number in range
  • Complete List of Excel Lookup and Reference Functions, References and Examples
  • How to use Excel FORMULATEXT function

Data Validations

  • Excel Data validation must begin with
  • Excel Data validation must contain specific text
  • Excel Data validation whole percentage only
  • Excel Data validation require unique number
  • Excel Data validation no punctuation

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

  • SWITCH function: Description, Usage, Syntax, Examples and Explanation
  • IFNA function: Description, Usage, Syntax, Examples and Explanation
  • How to return blank in place of #DIV/0! error in Excel
  • XOR function: Description, Usage, Syntax, Examples and Explanation
  • FALSE function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • How to get year from date in Excel
  • Get fiscal year from date in Excel
  • WORKDAY function: Description, Usage, Syntax, Examples and Explanation
  • Get day name from date in Excel
  • DAY function: Description, Usage, Syntax, Examples and Explanation

Grouping

  • Running count group by n size in Excel
  • Group numbers with VLOOKUP in Excel
  • Calculate conditional mode with criteria in Excel
  • Group arbitrary text values in Excel
  • How to randomly assign data to groups in Excel

General

  • Check if multiple cells have same value in Excel
  • Using Existing Templates in Excel
  • Excel Default Templates
  • How to get original price from percentage discount in Excel
  • Index and match on multiple columns in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning