Sorting variable length numbers, some with letters on the end

ROCKE

New Member
Joined
Jan 31, 2018
Messages
3
Column B lists my part numbers that are 3, 4, 5 and 6 digit long, some with letters on the end. They are formatted as numbers with the exception of numbers with leading zeros (00023).
I would like to sort using the first digit of the item number as such...

1000
110
110300
11040
11040S

...but i get this

110
1000
11040
110300
11040S
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I believe that you'll need to format the numbers as text, then sort on the text column....

If the following formula is in column K
=TEXT(J10,"#")
then you sort both column J and K, using K as the sort field, and click the option for "Sort numbers and numbers stored as text separately"
 
Upvote 0

Forum statistics

Threads
1,215,034
Messages
6,122,782
Members
449,095
Latest member
m_smith_solihull

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