=IFERROR(INDEX(list1,MATCH(MIN(IF(ISBLANK(list1),"",IF(COUNTIF($P$1:P1,list1)=0,1,MAX((COUNTIF(list1,"<"&list1)+1)*2))*(COUNTIF(list1,"<"&list1)+1))),IF(ISBLANK(list1),"",COUNTIF(list1,"<"&list1)+1),0)),"")
list1 is the name of the range you chose.
make sure that $P$1:P1 depends on which column you enter the formula in, if you enter the formula in column B, it should be $B$1:B1
just copy the formula down
FYI: it will be slow if it's a long list, just be patient
Excel Workbook | |||||||
---|---|---|---|---|---|---|---|
A | B | N | O | P | |||
1 | Unique Sorted List | List With Dups and Not Sorted | |||||
2 | Chin | Jo | |||||
3 | Jo | Joe | |||||
4 | Joe | Sioux | |||||
5 | John | Chin | |||||
6 | Sioux | Sioux | |||||
7 | Jo | ||||||
8 | Chin | ||||||
9 | John | ||||||
10 | |||||||
11 | |||||||
Sheet2 |
Did you try the formula that was in the link in post #2 above? It seems to do what you want (see example from video below).
Also, if you have a later ver. of Excel why not just copy the list to column A use remove duplicates from the menu under DATA and then sort.
Drag formula down as needed.
NOTE: This is an array formula and must be entered with CTRL-SHIFT-ENTER.
Sheet2
* A B N O P 1 Unique Sorted List * * List With Dups and Not Sorted * 2 Chin * * Jo * 3 Jo * * Joe * 4 Joe * * Sioux * 5 John * * Chin * 6 Sioux * * Sioux * 7 * * * Jo * 8 * * * Chin * 9 * * * John * 10 * * * * * 11 * * * * *
<COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 140px"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><COL style="WIDTH: 155px"><COL style="WIDTH: 64px"></COLGROUP><TBODY>
</TBODY>
Spreadsheet Formulas
Cell Formula A2 {=IFERROR(INDEX($O$2:$O$300,MATCH(0,COUNTIF($O$2:$O$300,"<"&$O$2:$O$300)-SUM(COUNTIF($O$2:$O$300,$A$1:A1)),0)),"")}
<TBODY>
</TBODY>Formula Array:
Produce enclosing { } by entering
formula with CTRL+SHIFT+ENTER!
<TBODY>
</TBODY>
Excel tables to the web >> Excel Jeanie HTML 4
You need to post a small sample of your data so we can see what you are dealing with.
=INDEX(nn,MATCH(0,COUNTIF(nn,"<"&nn)-SUM(COUNTIF(nn,$G$3:G3)),0))
<tbody> </tbody> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||