How?-Sorting last digits and not the first

J

jrkaisersr

I have the following data:

S12345
S12346
12347
12348

I would like to sort it in ascending numerical order, omitting the
leading 'S'. Is there anyway to do this?

Many Thanks,

Jason R. Kaiser Sr.
 
T

Toppers

You will need to separate the numeric part into a "helper" column and then
sort.

If data always has 5 digits as per your sample then

=Right(A1,5) will extract the numeric part. Copy down and sort on this column.

HTH
 
M

MartinW

Hi Jason,

In your simplified version all you need is to insert a helper
column next to your data and sort on that column.

i.e. if your data is in A1 down, in B1 put =RIGHT(A1,5)
and copy down to the end of your data and sort on column B.

If there is more variation in your data i.e. more or less digits
or whatever, then you will need a different approach.

HTH
Martin
 
S

starguy

if you have only S as first character of some of your data and rest o
numbers are not fixed then in col B (if your data starts from cell A1)
enter the following function in B1
=IF(LEFT(A1,1)="S",MID(A1,2,10),A1) and copy it down, it will extra
only numbers from your data. Then select col B and copy it, withou
deselecting, right click on the selection area, click paste special an
click values then ok. Now select col A and B and sort by col B i
ascending order. delete values from col B. you data is sorted i
ascending order as per numbers.

hope this would help you.
 
Top