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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
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,223,984
Messages
6,175,785
Members
452,669
Latest member
reeseann

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