ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Problem with Sorting (https://www.excelbanter.com/excel-discussion-misc-queries/258252-problem-sorting.html)

RS

Problem with Sorting
 
I am trying to sort the following, but keep getting the wrong answer. I want
A09-2 and A09-3 to be after A09-1, not the way it is shown below. I
appreciate any input. I know if I add a 0 in front of the 1, 2, or 3, it
will sort okay. However, I prefer to not have to do that. Any help would be
much appreciated!

A09-1
A09-10
A09-11
A09-12
A09-13
A09-14
A09-15
A09-16
A09-17
A09-18
A09-19
A09-2
A09-20
A09-21
A09-22
A09-23
A09-24
A09-25
A09-26
A09-27
A09-28
A09-29
A09-3


Fred Smith[_4_]

Problem with Sorting
 
I don't know of any way. I would insert a helper column with the formula:
=if(len(a1)=5,left(a1,4)&"0"&right(a1,1),a1)

Then sort on that column. You can hide the column if you don't want it
displayed.

Regards,
Fred

"RS" wrote in message
...
I am trying to sort the following, but keep getting the wrong answer. I
want
A09-2 and A09-3 to be after A09-1, not the way it is shown below. I
appreciate any input. I know if I add a 0 in front of the 1, 2, or 3, it
will sort okay. However, I prefer to not have to do that. Any help would
be
much appreciated!

A09-1
A09-10
A09-11
A09-12
A09-13
A09-14
A09-15
A09-16
A09-17
A09-18
A09-19
A09-2
A09-20
A09-21
A09-22
A09-23
A09-24
A09-25
A09-26
A09-27
A09-28
A09-29
A09-3



FSt1

Problem with Sorting
 
hi,
in a column to the right of your data, enter this.....
=MID(A1,5,99)
copy the formula down then sort using the helper column as the primary key.
after the sort, you can delete the helper column.(or keep it for future
sorts if needed.)
Regards
FSt1

"RS" wrote:

I am trying to sort the following, but keep getting the wrong answer. I want
A09-2 and A09-3 to be after A09-1, not the way it is shown below. I
appreciate any input. I know if I add a 0 in front of the 1, 2, or 3, it
will sort okay. However, I prefer to not have to do that. Any help would be
much appreciated!

A09-1
A09-10
A09-11
A09-12
A09-13
A09-14
A09-15
A09-16
A09-17
A09-18
A09-19
A09-2
A09-20
A09-21
A09-22
A09-23
A09-24
A09-25
A09-26
A09-27
A09-28
A09-29
A09-3


RS

Problem with Sorting
 
It worked perfect! Thank you SO much for your assistance with this! RS

"FSt1" wrote:

hi,
in a column to the right of your data, enter this.....
=MID(A1,5,99)
copy the formula down then sort using the helper column as the primary key.
after the sort, you can delete the helper column.(or keep it for future
sorts if needed.)
Regards
FSt1

"RS" wrote:

I am trying to sort the following, but keep getting the wrong answer. I want
A09-2 and A09-3 to be after A09-1, not the way it is shown below. I
appreciate any input. I know if I add a 0 in front of the 1, 2, or 3, it
will sort okay. However, I prefer to not have to do that. Any help would be
much appreciated!

A09-1
A09-10
A09-11
A09-12
A09-13
A09-14
A09-15
A09-16
A09-17
A09-18
A09-19
A09-2
A09-20
A09-21
A09-22
A09-23
A09-24
A09-25
A09-26
A09-27
A09-28
A09-29
A09-3


RS

Problem with Sorting
 
This one worked perfect as well! Thank you SO much for your assistance, as
well! Now I have two formulas to use instead of none. Thank you! RS

"Fred Smith" wrote:

I don't know of any way. I would insert a helper column with the formula:
=if(len(a1)=5,left(a1,4)&"0"&right(a1,1),a1)

Then sort on that column. You can hide the column if you don't want it
displayed.

Regards,
Fred

"RS" wrote in message
...
I am trying to sort the following, but keep getting the wrong answer. I
want
A09-2 and A09-3 to be after A09-1, not the way it is shown below. I
appreciate any input. I know if I add a 0 in front of the 1, 2, or 3, it
will sort okay. However, I prefer to not have to do that. Any help would
be
much appreciated!

A09-1
A09-10
A09-11
A09-12
A09-13
A09-14
A09-15
A09-16
A09-17
A09-18
A09-19
A09-2
A09-20
A09-21
A09-22
A09-23
A09-24
A09-25
A09-26
A09-27
A09-28
A09-29
A09-3


.


Fred Smith[_4_]

Problem with Sorting
 
You're welcome. Thanks for the feedback.

Regards,
Fred

"RS" wrote in message
...
This one worked perfect as well! Thank you SO much for your assistance,
as
well! Now I have two formulas to use instead of none. Thank you! RS

"Fred Smith" wrote:

I don't know of any way. I would insert a helper column with the formula:
=if(len(a1)=5,left(a1,4)&"0"&right(a1,1),a1)

Then sort on that column. You can hide the column if you don't want it
displayed.

Regards,
Fred

"RS" wrote in message
...
I am trying to sort the following, but keep getting the wrong answer. I
want
A09-2 and A09-3 to be after A09-1, not the way it is shown below. I
appreciate any input. I know if I add a 0 in front of the 1, 2, or 3,
it
will sort okay. However, I prefer to not have to do that. Any help
would
be
much appreciated!

A09-1
A09-10
A09-11
A09-12
A09-13
A09-14
A09-15
A09-16
A09-17
A09-18
A09-19
A09-2
A09-20
A09-21
A09-22
A09-23
A09-24
A09-25
A09-26
A09-27
A09-28
A09-29
A09-3


.




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

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