sorrting numbers of different lenghts in ascending order

hoochy_1

New Member
Joined
Oct 20, 2002
Messages
3
I have a spreadsheet with multiple columns. I am trying to sort on one column that has numbers in varying lenghts. Some are 5 digits, some are 6 digits, some are 7 digits long. The cells are formatted to be "numbers". However, when it sorts and comes to the longer digit numbers, the sorting starts over. What is wrong with the format of the cells? What is causing this?
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Mark W.

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,654
Let me speculate... The cells were formatted as Text when you entered the values. Subsequently, you reformatted the cells to a desired number format. However, cell formatting never alters the data stored in a cell and; therefore, Excel still see's these values as text.

To remedy this situation. Select your cells, choose the Data | Text to Columns... menu command and press [ Finish ].
 

hoochy_1

New Member
Joined
Oct 20, 2002
Messages
3
Your speculation was correct. It is now fixed. Thanks a bunch for your help.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,008
Messages
5,834,866
Members
430,324
Latest member
bosphoruskid

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
Top