View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default List Disctinct Strings from Range of Cells

One formulas play which will dynamically list the unique names, sorted
alphabetically by the leftmost letter (its not a true alphabetic sort, but
might suffice for your purpose). The sort criteria is set to make no
distinction between lower/upper case names

Source names assumed listed in Sheet1, in A2 down
In Sheet2,
In A2:
=IF(Sheet1!A2="","",IF(COUNTIF(Sheet1!A$2:A2,Sheet 1!A2)1,"",CODE(UPPER(LEFT(Sheet1!A2)))+ROW()/10^10))

In B2:
=IF(ISERROR(SMALL(A:A,ROWS($1:1))),"",INDEX(Sheet1 !A:A,MATCH(SMALL(A:A,ROWS($1:1)),A:A,0)))
Copy A2:B2 down to cover the max expected extent of source data, say down to
B100. Minimize/hide away the criteria col A. Col B returns the required list
of uniques, sorted in alpha sequence by the leftmost letter (case
insensitive) as mentioned above. Unique names with the same leftmost letter
will be listed in the relative order that they appear within the source. Any
good? Hit the YES below.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"golddave" wrote:
I have a spreadsheet where Sheet A contains names (including duplicates) in a
range. I'd like Sheet 2 to list the distinct names in alphabetical order.
Any ideas?