ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sorting table of numbers with different place values (https://www.excelbanter.com/excel-worksheet-functions/238644-sorting-table-numbers-different-place-values.html)

Lynn

Sorting table of numbers with different place values
 
How can I sort cells with letters and numbers, and the numerical digits have
different place values. For instance here is a simple list without decimals,
AA21, AA100, AA1, AA2. Is there a formula or macro that will sort the cells
as AA1, AA2, AA2, AA21, AA100?

Otto Moehrbach[_2_]

Sorting table of numbers with different place values
 
No. You will need to use a helper column. In that column place only the
numerical portion of the entry. You can do this with a formula. Post back
if you can furnish more detail about the entries and want help with that
formula. Having done that, you sort all the columns by that helper column.
Then you delete the helper column. HTH Otto
"Lynn" wrote in message
...
How can I sort cells with letters and numbers, and the numerical digits
have
different place values. For instance here is a simple list without
decimals,
AA21, AA100, AA1, AA2. Is there a formula or macro that will sort the
cells
as AA1, AA2, AA2, AA21, AA100?




Lynn

Sorting table of numbers with different place values
 
Thanks for the help Otto. Here is a better example of the items that need to
be in correct order. BE4-1.0L60 should be the first item after a sort.
BE16-2.0L400
BE16-2.5L200
BE16-2.5L250
BE16-2.5L315
BE16-2.5L400
BE4-1.0L100
BE4-1.0L125
BE4-1.0L160
BE4-1.0L60
BE4-1.0L80
BE4-1.2L100
BE4-1.2L125
BE4-1.2L160


"Otto Moehrbach" wrote:

No. You will need to use a helper column. In that column place only the
numerical portion of the entry. You can do this with a formula. Post back
if you can furnish more detail about the entries and want help with that
formula. Having done that, you sort all the columns by that helper column.
Then you delete the helper column. HTH Otto
"Lynn" wrote in message
...
How can I sort cells with letters and numbers, and the numerical digits
have
different place values. For instance here is a simple list without
decimals,
AA21, AA100, AA1, AA2. Is there a formula or macro that will sort the
cells
as AA1, AA2, AA2, AA21, AA100?






All times are GMT +1. The time now is 01:43 AM.

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