Help with sorting texts and numbers in the same column

edytwinky

Board Regular
Joined
Sep 8, 2006
Messages
199
I'm trying to sort many different order numbers on one column. They are as so:

698108
850235
850235
996926
7065682
6T-7881
7G-5444
7G-5445
7I-7728
7I-7728
7W-8791
8E-3603
R518851
R518851

If you notice, the number 6T-7881 is not kept with the 6's in numberical order. It's after the 7065682 number. How can I change it so it goes along with that?
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Welcome to the board.

Try selecting your column, going to data --> text to columns, click next twice, change "Column data format" to Text, and click finish. That will change your numbers to "numbers stored as text".

When you go to sort, you should get a sort warning that says "The following sort key may not sort as expected because it contains some numbers formatted as text:" and ask you what you want to do. Choose the second option ("Sort numbers and numbers stored as text separately").
 
Upvote 0
Thanks for the welcome!

I gave it a whirl and no dice. Were you able to get it to work? I did not receive the error message. The sort still came through with the numbers first, then the numbers with letters: same as last time.
 
Upvote 0
Worked for me.

Here are the results after sorting:
Book2
ABCD
1698108
26T-7881
37065682
47G-5444
57G-5445
67I-7728
77I-7728
87W-8791
9850235
10850235
118E-3603
12996926
13R518851
14R518851
Sheet1


Are you sure you followed all Oaktree's directions?
 
Upvote 0

Forum statistics

Threads
1,214,652
Messages
6,120,746
Members
448,989
Latest member
mariah3

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