Article updated on February 14, 2018

Inspired from a comment in this article Unique values from multiple columns using array formulas I have now created this article. From a range spanning multiple rows and columns  I extract a unique distinct list sorted from A-Z.

Array formula in B8:

=INDEX(tbl, SMALL(IF(SMALL(IF(COUNTIF(\$B\$7:B7, tbl)=0, COUNTIF(tbl, "<"&tbl)+1, ""), 1)=COUNTIF(tbl, "<"&tbl)+1, ROW(tbl)-MIN(ROW(tbl))+1), 1), MATCH(MIN(IF(COUNTIF(\$B\$7:B7, tbl)>0, "", COUNTIF(tbl, "<"&tbl)+1)), INDEX(COUNTIF(tbl, "<"&tbl)+1, SMALL(IF(SMALL(IF(COUNTIF(\$B\$7:B7, tbl)=0, COUNTIF(tbl, "<"&tbl)+1, ""), 1)=COUNTIF(tbl, "<"&tbl)+1, ROW(tbl)-MIN(ROW(tbl))+1), 1), , 1), 0), 1) + CTRL + SHIFT + ENTER

Copy cell B8 and paste it down as far as necessary.

Recommended articles

Extract a unique distinct list sorted alphabetically and ignore blanks from a range

This is an answer to a question in this blog post: Extract a unique distinct list sorted from A-Z from […]

Extract unique distinct values from a multi-column cell range

Question: I have cell values spanning over several columns and I want to create a unique list from that range. […]

Extract duplicates from a range using excel array formula

Overview Inspired by a comment in this post Unique values from multiple columns using array formulas, I  created an array […]

### Named ranges

tbl (B2:E5)
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 \$B\$7:B7 in the above formulas to F2:\$F\$2.