Well, a pivot table would do that, but wouldn't keep the order.
You can get around that by adding a column with numbers -like this for B2 (assuming you column is in A, and there's no header row):
=if(A2=A1,B1,B1+1)
Fill down. This way you'll have a column that assignes a new number every time the value in A changes.
If values are re-appering further down in list, use countif instead:
=if(countif($A$1:A2,A2)=1,A1,A1+1)
Fill down.
Then, in a separate sheet / wb, use index/match in combination with row to get your function:
=index(Sheet1!A1:B10,match(row(1:1),B1:B10,false),2)
Fill down.
If preferred, nest an ISERROR or something to remove error messages when the number passes the no of unique values.
// Patrik
______________________________
To the optimist, the glass is half full. To the pessimist, the glass is half empty. To the IT Professional, the glass is twice as big as it needs to be.