Sort column with '000 format

ajcrig99

New Member
Joined
Nov 7, 2018
Messages
4
Hopefully this one is super easy, I have a column of numbers starting at 0 and going to 200 but must be 3 digits long. I have added '00 and '0 to all numbers below 100 so they display as 001, 002 etc but now they do not sort properly. This is how they show up

[TABLE="class: grid, width: 50, align: center"]
<tbody>[TR]
[TD]113[/TD]
[/TR]
[TR]
[TD]200[/TD]
[/TR]
[TR]
[TD]201[/TD]
[/TR]
[TR]
[TD]202[/TD]
[/TR]
[TR]
[TD]000[/TD]
[/TR]
[TR]
[TD]009[/TD]
[/TR]
[TR]
[TD]010[/TD]
[/TR]
[TR]
[TD]011[/TD]
[/TR]
[TR]
[TD]028[/TD]
[/TR]
[TR]
[TD]033[/TD]
[/TR]
</tbody>[/TABLE]

This is how I want them to show:

[TABLE="class: grid, width: 50, align: center"]
<tbody>[TR]
[TD]000[/TD]
[/TR]
[TR]
[TD]009[/TD]
[/TR]
[TR]
[TD]010[/TD]
[/TR]
[TR]
[TD]011[/TD]
[/TR]
[TR]
[TD]028[/TD]
[/TR]
[TR]
[TD]033[/TD]
[/TR]
[TR]
[TD]113[/TD]
[/TR]
[TR]
[TD]200[/TD]
[/TR]
[TR]
[TD]201[/TD]
[/TR]
[TR]
[TD]202[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
I am guessing you have a mix of numbers and numbers entered as text (you can tell if you take off the alignment and some are right-justified (numbers), and some are left-justified (text).

In order to get them to sort properly, they must ALL be of the same data type (numeric or text).

So, if you are typing a single quote before your leading zeroes, then you must enter EVERY number like that (or change the column to Text format, and re-enter your values).
Or, enter all the values as numbers, and use a Custom format of "000" to display them as three digit numbers.

It is an "either or" situation. You cannot mix them up, and get them to behave the way you want.
 
Upvote 0
You are weclome.

You can also avoid having to do that if you format the whole column as Text before typing in your values.
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,312
Members
452,634
Latest member
cpostell

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