How do I sort the last 3 digits first and then the first 4 digit?.

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

Guest

I was always trying to sort the list of Medical Records to be retrieved from
filing shelves which is arranged by Termianl Digit Filing system. In our
hospital, each patient has a 7 digit unit number and this unit number is
devided into two sections of primary number and secondary number.

for example. the files are arranged as follows:
2345-678
2346-678
2347-678
----_---
----_---
1234-679
1235-679

I would greatly appreciate if someone could help me to sort numbers in this
order.
Thanks
 
This is one way.

Copy the column of data to a blank column.
Data -> Text to columns
Set the delimiter to be -
Sort the columns as needed.
 
Create a helper column in (column B)
In B1: =--RIGHT(A1,3)
copy down as far as needed

Select data ranges
Data >> Sort >> sort by select Column B Ascending >> Then by Column A
Ascending >> OK

When you done delete a helper column
 
Back
Top