Question : How to sort complecated text in excel

i have a BatchID, which consist of three parts:
Date, dash,number:
01/19/2009-1
01/19/2009-10
01/19/2009-6
01/19/2009-8
01/19/2009-9
how to sort by this and get the sequence like 1,2,6,8,9,10
in my case 10 is going right after 1

Answer : How to sort complecated text in excel

I put your data in A2:A6, and in B2 put this formula:

=LEFT(A2,FIND("-",A2)-1)&TEXT(MID(A2,FIND("-",A2)+1,100),"0000000000")

I copied that down as need, and then sorted using that column.  Worked pretty well :)

Now let me ask you, how should these sort:

01/19/2009-1
01/19/2009-10
01/19/2009-6
01/19/2009-8
01/19/2009-9
02/19/2008-1
02/19/2008-10
02/19/2008-6
02/19/2008-8
02/19/2008-9
Random Solutions  
 
programming4us programming4us