Sort by last 2 digits

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

Guest

I would like to sort a column by the last 2 digits of the cell entry. The
entries will begin with 2 to 3 letters followed by 7 numeric digits. Example:
BY0123456.
I would like to sort using the 56. How can I accomplish this?
 
A simple solution would to add a column that contains the formula
=Right(OrigDataCellAddress,2), which returns the last two characters of the
original cell; Then sort on this new column.

The downside to this is that if the last 2 characters are numbers and the
second last character is a zero, then it will only return the last character,
because the returned value is a number. To overcome this, you would have to
use the Text() function.

Dan Knight
 
Pull out the last 2 digits into a new column using:

=RIGHT(A1,2)

Then select all columns with data and sort based on this
new column.

HTH
Jason
Atlanta, GA
 
Actually, the returned value will be a text string. The
formula won't drop the zero.

Jason
 
Back
Top