Can you sort a column by text going right to left?

L

luvsdogz

I am trying to sort a by column, but want the sort to start with the right
side of the column-for example
1234gk-want to sort by kg4321 or really just gk, but I thought I could get
right to left easier.
I don't want to go thru the whole sheet to delete the numbers
 
R

Rowan Drummond

If all your data is in that format in an unused column you could enter
the formula:
=Right(A1,2)
Then copy down and sort on this new column

Hope this helps
Rowan
 
R

Ron Rosenfeld

I am trying to sort a by column, but want the sort to start with the right
side of the column-for example
1234gk-want to sort by kg4321 or really just gk, but I thought I could get
right to left easier.
I don't want to go thru the whole sheet to delete the numbers

Are all the sort keys the same length?

In other words, are there always 6 characters?

If that is the case, then you could use worksheet formulas to generate the
reverse of the number in an adjacent column, and then sort on that reversed
column.

For example:

=CONCATENATE(RIGHT(A1,1),MID(A1,5,1),MID(A1,4,1),MID(A1,3,1),MID(A1,2,1),LEFT(A1,1))

If there is more variability, the approach could be similar, but with testing
for the length of the string.


--ron
 
L

luvsdogz

THANK YOU!!!!!!!!!!!!! Works like a charm!
Aimee

Rowan Drummond said:
If all your data is in that format in an unused column you could enter
the formula:
=Right(A1,2)
Then copy down and sort on this new column

Hope this helps
Rowan
 
D

DeepestBlue

On a slightly similar vein... Can you suggest a way to sort by IP addresses?
since the format is 10.105.72.1 -255 and there are no leading zeros to
indicate value order. I'm having trouble getting it to sort without is
listing it as
1
10
100
101
102
103
104
105
106
107
108
109
11
111
112
113...etc...

any thoughts would be helpful.

Thanks,

DB
 
C

cmajor335

as this Postis 21 months old and nobody has replied perhaps Microsoft have
mucked up the sort in EXCEl. As I have tried to sort product numbers which
could be between 5 and 10 digits long strting with any digit between 0 and 9
and EXCEL2003 want to always sort it by the value, so 999250 comes before
1890046, whereas in all earlier Excel products I have never had a problem.
If any one can help please post the reply here.
GR
 
Top