Stolen from J-Walk:
Assuming data is in cells A2:A100. Enter this array formula in B2 -
commit with ctrl+shift+enter.
=INDEX($A$2:$A$100,SMALL(IF(MATCH($A$2:$A$100,$A$2:$A$100,0)=ROW($A$1:INDIRECT(CHAR(65)&COUNTA($A$2:$A$100))),MATCH($A$2:$A$100,$A$2:$A$100,0),""),ROW()-ROW($A$2:$A$100)+1))
Copy down.
Note you will have to adjust the range to suit your data as any blank
cells will result in a #NA error.
Actually, it's there so that the cell remains blank when no more unique
records exist. Otherwise the formula would return a #N/A error. It's
something I recently picked up from Harlan.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.