Question: How do I create a unique distinct list from a list containing several blanks?

unique-list-and-remove-blanks

Answer:

unique-list-and-remove-blanks-2

Array formula in B2:

=INDEX($A$2:$A$11, MATCH(0, IF(ISBLANK($A$2:$A$11), 1, COUNTIF(B1:$B$1, $A$2:$A$11)), 0)) + CTRL + SHIFT + ENTER

copied down as far as necessary.

Download excel sample file for this tutorial.

unique-values-from-list-with-several-blanks.xls
(Excel 97-2003 Workbook *.xls)

Functions used in this article:

IF(logical_test;[value_if:true];[value_if_false])
Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE

INDEX(array,row_num,[column_num])
Returns a value or reference of the cell at the intersection of a particular row and column, in a given range

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

ISBLANK(value)
Checks whether a reference is to an empty cell and returns TRUE or FALSE

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