This formula shows one way to count unique values, as long as they are numeric.

We use it here as a roundabout way to count unique numeric values.

To apply criteria, we use the IF function.

Excel formula: Count unique text values in a range

The FALSE values are automatically ignored.

This is the feature that allows this approach to work.

This is done with thedouble-negative(–).

Excel formula: Count unique values in a range with COUNTIF

These formulas can be adapted toapply logical criteria.

These values can be numbers, cell references, ranges, arrays, and constants, in any combination.

SUM can handle up to 255 individual arguments.

Excel formula: Count unique text values with criteria

Excel formula: Extract unique items from a list

Excel FREQUENCY function

Excel SUM function