View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jarek Kujawa[_2_] Jarek Kujawa[_2_] is offline
external usenet poster
 
Posts: 896
Default Sorting alphanumeric data at 2nd, 3rd or 4th character position

quick and dirty:

in A1
=MID(A1,FIND("/",A1)-2,2)

in C1
=MID(A1,FIND("/",A1)+1,LEN(A1)-FIND("/",A1))

in D1
=MID(A1,1,FIND("/",A1)-3)

copy/drag down
then do the sorting

pls click YES if this helped

On 29 Maj, 08:34, kykles wrote:
I am trying to sort the following data (for example):
PL00/1235
PL04/1111
PL05/3211
PL88/0463
PL97/8546
PL99/2134
PROF02/5555
PROF05/6743
PROF06/7952
PROF88/1623
PROF97/1236
PROF99/1644
MED89/5263
MED97/2563
MED01/1256
MED05/1333

I would like to be able to sort by firstly the numbers following the letters
(which indicates the year) and secondly alphabetically by the letters in
front of those years (ie PL,PROF,MED) and thirdly by the number following the
forward stroke (/).

Does anyone know how this might be done?