COUNTUNIQUEIFS

Returns the number of distinct values in a range that satisfy one or more given conditions.

Parameter List

Syntax
COUNTUNIQUEIFS(rangecriteria_range1criterion1
[criteria_range2criterion2]
)
range

The range from which to count distinct values. For example: A1:A10.

criteria_range1

The range of conditional values to check against criterion1. Must be the same size as range. For example: B1:B10.

criterion1

The condition to apply to criteria_range1. For example: ">5".

[optional] criteria_range2

An additional range of conditional values to check against criterion2. Must also match the size of range.

More details

In range, COUNTUNIQUEIFS counts the number of distinct values that satisfy all specified conditions across the given criteria_range pairs.

You can use:

  • "" to count unique values where criteria_range has no value.

  • "<>" to count unique values where criteria_range is not empty.

  • "<>number" or "<>text" to count unique values that are not equal to that number or text in criteria_range.

  • Operators such as ">" or ">=" to count unique values where the condition is true.

Examples

COUNTUNIQUEIFS(A1, 16) returns F