sort

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a list as follows:
CE0114XXXX42___
CE0114XXXX42___
CE0114XXXX42___
CE0114XXXX42___
CE0115XXXX_____
CE0115XXXX_____
CE0115XXXX_____
CE0115XXXX_____
CE0115XXXX_____
CE0115XXXX_____
CE0115XXXX_____
CE0115XXXX_____
CE0115XXXX_____
CE0115XXXX_____
CE0115XXXX_____
CE0115XXXX_____
CE0115XXXX_____
CE0116BLAK36___
CE0116BLAK36___

I'd like to sort it in such a way that I could trim the extra characters
after the letters. The problem is that it is that I have 29k records. I know
I could use left or trim but it would be much easier if all records with
similar number of characters to extract would be in the same place. Otherwise
I am using mid over and over again.

Thanks in advance.
 
Hi Tony,

i am not very sure why you want to sort this, but I think you want remove
the _ which is in the end. Instead of sorting, try this-

=MID(A1,1,SEARCH("_",A1)-1)

This will extract the string starting from first char till the char before
'_'.
 
Back
Top