View Single Post
  #2   Report Post  
Dave O
 
Posts: n/a
Default

Using your sample data, and assuming it is in cell A1:A5, enter this
formula in B1:
=LEN(A1)

Copy cell B1 and paste it into B2:B5. This generates the length- the
number of columns- in your document number. Then when you sort, sort
first on column B, and then on column A.