Found this formula and used it in B2:B1500 as an array formula
{=INDEX(List,MATCH(MIN(IF(ISBLANK(List)+COUNTIF(B1:$B$1,List),"",IF(ISNUMBER(List),COUNTIF(List,"<"&List),COUNTIF(List,"<"&List)+SUM(IF(ISNUMBER($A$2:$A$15),1,0))+1))),IF(ISBLANK(List)+COUNTIF(B1:$B$1,List),"",IF(ISNUMBER(List),COUNTIF(List,"<"&List),COUNTIF(List,"<"&List)+SUM(IF(ISNUMBER(List),1,0))+1)),0))}

I have a non-sorted list of values and many blanks (total over 1500 of them) in column A (List). I am able to get a unique sorted list of the values in column B (varies between 50 and 200 unique items). Once the list is created the trailing cells show the ugly "#N/A" in rest of the cells.

I tried to surround the above formula with an IF(Unique,"AA"," blank ") function, but I keep getting an error that reads "The specified formula cannot be entered because it uses more levels of nesting than are allowed in the current file format."

Cannot figure out how to get around this error, and get rid of those confusing #N/A's at the end of column B

Column A looks something like this:
AA
21
8
"blank"
XX
TT
KK
"blank"
AA
FF
"blank"
CC
8
9

Column B should look like this
8
9
21
AA
CC
FF
KK
TT
XX

I would appreciate a workaround this or a suggestion.
RJK