Author: Oscar Cronquist Article last updated on October 08, 2018

I created three columns. The first column contains "Error values", values that are not unique distinct values. Missing values are values that are unique distinct but missing in the unique distinct list. Duplicate values are values that are unique distinct values in the original list but exists more than once in the unique distinct list.

validate unique distinct list

Is "Unique distinct list" valid?

Here is an array formula in F22 that returns TRUE or FALSE if "unique distinct list" is valid:

=AND(AND(COUNTIF(list, unique_list)>0), AND(COUNTIF(unique_list, unique_list)<2), AND(COUNTIF(unique_list, list)>0)) + CTRL + SHIFT + ENTER

Error values

Array formula in C15:

=INDEX(unique_list, SMALL(IF(COUNTIF(list, unique_list)=0, ROW(unique_list)-MIN(ROW(unique_list))+1), ROW(1:1))) + CTRL + SHIFT + ENTER

copied down as far as needed.

Missing values

Array formula in E15:

=INDEX(list, MATCH(0, COUNTIF(E14:$E$14, list)+COUNTIF(unique_list, list), 0)) + CTRL+ SHIFT + ENTER

copied down as far as needed.

Duplicate values

Array formula in G15:

=INDEX(unique_list, MATCH(TRUE, (COUNTIF(unique_list, unique_list))*(COUNTIF(list, unique_list)>0)*(COUNTIF($G$14:G14, unique_list)=0)>1, 0)) + CTRL+ SHIFT + ENTER

copied down as far as needed.

Named ranges

unique_list (E3:E9)
list (C3:C9)
What is named ranges?

How to implement array formula to your workbook

Change the named range. If your list starts at, for example, F3. Change $E$14:E14 (or $G$14:G14) to F2:$F$2, in the above formulas.

Download excel file for this tutorial.

Validate unique distinct list.xls
(Excel 97-2003 Workbook *.xls)

Functions in this article:

Counts the number of cells within a range that meet the given condition

Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE

MATCH(lookup_value;lookup_array; [match_type]
Returns the relative position of an item in an array that matches a specified value

Returns a value or reference of the cell at the intersection of a particular row and column, in a given range

Returns the smallest number in a set of values. Ignores logical values and text

ROW(reference) returns the rownumber of a reference

SMALL(array,k) Returns the k-th smallest row number in this data set.