Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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? |
#2
![]() |
|||
|
|||
![]()
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 "mbparks" wrote: 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? |
#3
![]() |
|||
|
|||
![]()
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 -----Original Message----- 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? . |
#4
![]() |
|||
|
|||
![]()
Actually, the returned value will be a text string. The
formula won't drop the zero. Jason -----Original Message----- 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 "mbparks" wrote: 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? . |
#5
![]() |
|||
|
|||
![]()
Thanks millions and millions to all...
"mbparks" wrote: 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I sort by row instead of by column? | Excel Worksheet Functions | |||
Sort Function Without Using VBA | Excel Worksheet Functions | |||
"-" ignored in sort | Excel Discussion (Misc queries) | |||
Excel Sort function should not sort the cell formatting! | Excel Worksheet Functions | |||
Data > Sort function amnesia? | Excel Discussion (Misc queries) |