Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • How to create dynamic named range with OFFSET in Excel
  • How to get relative column numbers in a range in Excel
  • How to reference named range different sheet in Excel
  • How to retrieve first match between two ranges in Excel
  • Merge tables with VLOOKUP in Excel

Data Analysis Examples

  • Example of COUNTIFS with variable table column in Excel
  • Remove Duplicates Example in Excel
  • Excel Bar Chart
  • Filter Data Based on Date in Excel
  • Use Data Form to input, edit and delete records in Excel

Data Validation Examples

  • Excel Data validation with conditional list
  • Excel Data validation don’t exceed total
  • Data validation must not exist in list
  • Excel Data validation allow uppercase only
  • Excel Data validation date in next 30 days

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:

Count cells that contain errors in Excel

Next Post:

Count cells not equal to many things 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
  • How to split text with delimiter in Excel
  • Add line break based on OS in Excel
  • How to get first word in Excel
  • Get first name from name with comma — Manipulating NAMES in Excel
  • How to count total characters in a range in Excel
  • Add months to date in Excel
  • How to calculate next scheduled event in Excel
  • WORKDAY.INTL function: Description, Usage, Syntax, Examples and Explanation
  • Convert text date dd/mm/yy to mm/dd/yy in Excel
  • Basic Overtime Calculation Formula in Excel
  • PMT function: Description, Usage, Syntax, Examples and Explanation
  • IRR function: Description, Usage, Syntax, Examples and Explanation
  • How to set check register balance in Excel
  • CUMPRINC function: Description, Usage, Syntax, Examples and Explanation
  • Example of Future value of annuity in Excel
© 2022 xlsoffice . All Right Reserved. | Teal Smiles