ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   sorting problem 10 comes before 8 (https://www.excelbanter.com/excel-worksheet-functions/234037-sorting-problem-10-comes-before-8-a.html)

ty

sorting problem 10 comes before 8
 
When sorting a list in a column where some are single digits and some are
such as :
1
3
8
8 x 12
10 x 10
they sort as follows
1
3
8
10 x 10
8 x 12
single numbers are fine but once you hit the ones with the x (to show
measurements) the 1 in the 10 x 10 comes before the 8. It does not help to
make it text.
Any thoughts

Bob Umlas[_3_]

sorting problem 10 comes before 8
 
You need a helper column. Assuming your list starts in A1, enter this in B1
by using ctrl+shift+enter, then fill down, then sort on column B:
=1*LEFT(A1,MATCH(TRUE,ISERROR(1*MID(A1,ROW($1:$10) ,1)),0)-1)

Bob Umlas
Excel MVP

"ty" wrote in message
...
When sorting a list in a column where some are single digits and some are
such as :
1
3
8
8 x 12
10 x 10
they sort as follows
1
3
8
10 x 10
8 x 12
single numbers are fine but once you hit the ones with the x (to show
measurements) the 1 in the 10 x 10 comes before the 8. It does not help
to
make it text.
Any thoughts




Marcelo

sorting problem 10 comes before 8
 
Bob one question, as it is an array formula how can I copy it down?

thanks
--
pleae click yes if it was helpfull
regards from Brazil
Marcelo



"Bob Umlas" escreveu:

You need a helper column. Assuming your list starts in A1, enter this in B1
by using ctrl+shift+enter, then fill down, then sort on column B:
=1*LEFT(A1,MATCH(TRUE,ISERROR(1*MID(A1,ROW($1:$10) ,1)),0)-1)

Bob Umlas
Excel MVP

"ty" wrote in message
...
When sorting a list in a column where some are single digits and some are
such as :
1
3
8
8 x 12
10 x 10
they sort as follows
1
3
8
10 x 10
8 x 12
single numbers are fine but once you hit the ones with the x (to show
measurements) the 1 in the 10 x 10 comes before the 8. It does not help
to
make it text.
Any thoughts






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

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