Question: How do I count unique and unique distinct values in a range, for example cells A1:D4?

Answer:

count-unique-and-unique-distinct-values-in-a-multicolumn-range

Formula in D8:

=SUM(IF(COUNTIF(tbl, tbl)=1, 1, 0)) + CTRL + SHIFT + ENTER

Formula in D9:

=SUM(1/COUNTIF(tbl, tbl)) + CTRL + SHIFT + ENTER

Named ranges
tbl (A1:D4)
What is named ranges?

Functions in this article:

COUNTIF(range,criteria)
Counts the number of cells within a range that meet the given condition

SUM(number1,[number2],)
Adds all the numbers in a range of cells

This blog article is one out of twelve articles on the same subject "count unique and unique distinct".