Explanation
This example uses the UNIQUE function to extract unique values.
Since there are seven items inarray, COUNTA returns 7.
This formula is dynamic and will recalculate immediately when source data is changed.
The formula in D5 is:
Which returns the seven values seen in D5:D11.
Then COUNTA counts the zero.
This approach isexplained in more detail here.
you’re able to also filterunique values with criteria.
This alternative formula will count all values returned by UNIQUE that have a length greater than zero.
This is an example ofboolean logic.
This formula will also exclude empty cells from results.
Dynamic source range
UNIQUE won’t automatically change the source range if data is added or deleted.
COUNTA does not count empty cells.