Create a unique distinct alphabetically sorted list, extracted from a column in excel
I came up with a new idea when I reread a previous article Sorting text cells using array formula in excel. Maybe it is possible to sort the new unique distinct list alphabetically.
To the right is a picture of the list I will be working with. I created named ranges, List (A2:A10) and a named range for the start cell of the list, List _start (A2).
Here is the formula in B2:B10. See picture below.
Edited 2009-06-28 Here is a shorter formula:
Array formula in cell B2, see picture below.
and copy it down as far as necessary, to get unique list sorted alphabetically from A to Z.
To remove errors in Excel 2007:
and copy it down as far as necessary, to get unique list sorted alphabetically from A to Z.
How to customize formula to your workbook
Change named ranges in formula.
Download excel sample file for this tutorial.
unique-list-sorted-alphabetically.xls
(Excel 97-2003 Workbook *.xls)
Functions 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
SMALL(array,k) returns the k-th smallest row number in this data set.
ROW(reference) returns the rownumber of a reference
MATCH(lookup_value;lookup_array; [match_type])
Returns the relative position of an item in an array that matches a specified value
COUNTIF(range,criteria)
Counts the number of cells within a range that meet the given condition
COUNT(value1;[value2])
Counts the number of cells in a range that contain numbers
Related blog posts
- Create a drop down list containing only unique distinct alphabetically sorted text values using excel array formula
- Extract a unique distinct list sorted alphabetically removing blanks from a range in excel
- Extract a list of alphabetically sorted duplicates from a column in excel
- Filter a column and create a new unique list sorted from A to Z using array formula in excel
- Create a drop down list containing alphabetically sorted values in excel







July 3rd, 2010 at 4:44 pm
Great formula. With your formulas, I always modify the formula to deal with blank spaces. My data usually contains blank rows. =INDEX(List,MATCH(MIN(IF(ISBLANK(List),"",IF(COUNTIF($B$1:B1,List)=0,1,MAX((COUNTIF(List,"<"&List)+1)*2))*(COUNTIF(List,"<"&List)+1))),IF(ISBLANK(List),"",COUNTIF(List,"<"&List)+1),0). At the isblank place, you can also add other conditions like a unique list where the letter for example begins with z.
To do a descending list, change "".
July 3rd, 2010 at 4:44 pm
This does work with numbers. Is there a way to get this to work with numbers and text?
July 3rd, 2010 at 4:45 pm
I meant to say it does not work with numbers.
July 10th, 2010 at 8:38 pm
I have tried to make this work with numbers, by using an if condition to coerce a range into text -(if(isnumber(list),text(list,"0"... but I found out that countif cannot coerce a range.
July 10th, 2010 at 10:19 pm
Sean,
See this post: http://www.get-digital-help.com/2009/06/06/sorting-numbers-and-text-cells-also-removing-blanks-using-array-formula-in-excel/
July 11th, 2010 at 7:22 pm
Oscar, Thanks. That is a great formula. Is there a way to make it so it can create a unique distinct list?
July 11th, 2010 at 9:36 pm
See this post: http://www.get-digital-help.com/2010/07/11/create-a-unique-distinct-sorted-list-containing-both-numbers-text-removing-blanks-in-excel/
January 29th, 2011 at 7:26 am
[...] http://www.get-digital-help.com/2009/04/14/create-a-unique-alphabetically-sorted-list-extracted-from... [...]