sort a cell by last two digits

M

mi20chelle02

I am trying to sort my colum by the last two digits of the number in each cell.
EX:
50201.1001
50201.1002
50201.1003
50201.2001
50201.2002
50201.2003
50201.3001
50201.3002
50201.3003

I want to sort by the last two digist of 01,02,03 of my column. Does anyone
have any idea how to do this. Or if it is even possible. If you do please
can you explain to me step by step what I will have to do to accomplish this
task.

Thanks for your help.
 
G

Gary''s Student

Put your data in column A and in B1 enter:

=--RIGHT(A1,2) and copy down

then sort both cols A & B by B
 
F

FSt1

hi
most custom sort are done by adding a helper column and using the helper
column as the primary sort.
in a blank column next to your data, enter this formula....
assuming data starts at A2...
=right(A2,2)
this will return the last to digits of the data in A2. Copy the formula down
as far as you need.
now just sort the data, including the helper column as primary sort. other
colunms as secondary/other.
the helper column is just a tool, not part of the data so after sort, you
can delete if no longer needed or hided if you need to sort frequently.

Regards
FSt1
 
J

JE McGimpsey

One way is to use a helper column.

Assume the values are in column A, and column B is blank.

If the values are Text, enter

B1: =RIGHT(A1,2)

if the values are numbers, you're safer using

B1: =RIGHT(TEXT(A1,"0.0000"),2)

Sort both columns using column B to sort by.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top