Sorting

Nine Zero

Well-known Member
Joined
Mar 10, 2016
Messages
625
Hello,

I have a list of the following

xyz1
xyz2
xyz4
xyz11
xyz3

<tbody>
</tbody>

I need to sort them but Excel will only sort them if i have the same amount of digits in the number like say
xyz01
xyz02
xyz03
xyz04
xyz11

<tbody>
</tbody>

is there a way to sort them without having to do that so that i get from my current to my expected
Current Result
Expected Result
xyz1
xyz1
xyz11
xyz2
xyz2
xyz3
xyz3
xyz4
xyz4
xyz11

<tbody>
</tbody>
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Depending on your data, you could create a work column with your data normalized, then sort by that column.

AB
1xyz1xyz001
2xyz2xyz002
3xyz3xyz003
4xyz4xyz004
5xyz11xyz011

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B1=LEFT(A1,3)&TEXT(MID(A1,4,9)+0,"000")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,972
Messages
6,128,003
Members
449,414
Latest member
sameri

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top