Question: My list contains text values and I have filtered a new list with unique text values. I would like to know if my unique list is valid?


Unique values are values occuring only once in a list or range.

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

validate unique list1

Is "Unique list" valid?

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

=AND(AND(COUNTIF(list, unique_list)=1), SUM(IF(COUNTIF(list, list)=1, 1, 0))=SUM(IF(COUNTIF(list, unique_list)=1, 1, 0))) + CTRL + SHIFT + ENTER

Error values

Array formula in C15:

=INDEX(unique_list, SMALL(IF(COUNTIF(list, unique_list)<>1, 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)=1)*(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 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.