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

Data Analysis

  • Number and Text Filters Examples in Excel
  • Conditional Formatting Rules in Excel
  • Randomize/ Shuffle List in Excel
  • Move chart to a separate worksheet in Excel
  • How to create dynamic reference table name in Excel

References

  • Excel Advanced Lookup using Index and Match Functions
  • Merge tables with VLOOKUP in Excel
  • CHOOSE function: Description, Usage, Syntax, Examples and Explanation
  • Approximate match with multiple criteria in Excel
  • Lookup entire row in Excel

Data Validations

  • Data validation must not exist in list
  • Excel Data validation allow uppercase only
  • Excel Data validation exists in list
  • Excel Data validation unique values only
  • 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:

44 Practical Excel IF function Examples

Next Post:

Large with criteria 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 Excel AND Function
  • IFERROR function: Description, Usage, Syntax, Examples and Explanation
  • Invoice status with nested if in Excel
  • IF function: Description, Usage, Syntax, Examples and Explanation
  • IFNA function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Convert time to time zone in Excel
  • Sum race time splits in Excel
  • Convert date string to date time in Excel
  • Add decimal hours to time in Excel
  • How to enter Today’s Date or Static Date and Time in Excel

Grouping

  • Group times into 3 hour buckets in Excel
  • Running count group by n size in Excel
  • Group times into unequal buckets in Excel
  • Group numbers with VLOOKUP in Excel
  • If cell contains one of many things in Excel

General

  • How to generate random number weighted probability in Excel
  • Lock Cells in a Worksheet Excel
  • How to add sequential row numbers to a set of data in Excel
  • Check if multiple cells have same value in Excel
  • Select, Insert, Rename, Move, Delete Worksheets in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning