ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Can you sort a column by text going right to left? (https://www.excelbanter.com/excel-discussion-misc-queries/59348-can-you-sort-column-text-going-right-left.html)

luvsdogz

Can you sort a column by text going right to left?
 
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

Rowan Drummond

Can you sort a column by text going right to left?
 
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

luvsdogz wrote:
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


Ron Rosenfeld

Can you sort a column by text going right to left?
 
On Wed, 7 Dec 2005 18:24:02 -0800, "luvsdogz"
wrote:

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),M ID(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

luvsdogz

Can you sort a column by text going right to left?
 
THANK YOU!!!!!!!!!!!!! Works like a charm!
Aimee

"Rowan Drummond" wrote:

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

luvsdogz wrote:
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



Rowan Drummond

Can you sort a column by text going right to left?
 
You're welcome.

luvsdogz wrote:
THANK YOU!!!!!!!!!!!!! Works like a charm!
Aimee


DeepestBlue

Can you sort a column by text going right to left?
 
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

cmajor335

Can you sort a column by text going right to left?
 
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

"DeepestBlue" wrote:

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


Bob I

Can you sort a column by text going right to left?
 
Try starting your own thread describing why you don't want numbers
sorted by value.

cmajor335 wrote:
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

"DeepestBlue" wrote:


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




All times are GMT +1. The time now is 05:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com