Help With Sort

Dazzawm

Well-known Member
Joined
Jan 24, 2011
Messages
3,786
Office Version
  1. 365
Platform
  1. Windows
I have some data which will not sort how I want it to. It is in the format of 4 letters and either 3 or 4 digits as below.

ABCD123
ABCD1024
ABCD683 etc etc

When I sort it only does it like ABC all the ones then all the twos but I want it to sort in numerical value i.e ABC then all the numbers to 1000 then ABC then all the numbers to 2000 and so on..
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Assuming your data is in column A (from A2 down), then a quick fix would be to insert a helper column, and use the formula in B2 and copy down:

Code:
=MID(A2,4,4)

This will show all of the numerical values from your data... use these to sort by instead... :)

EDIT - Don't think this does exactly what you are after... instead use text to columns to split the data then sort by ABC... then by number...
 
Last edited:
Upvote 0
I'm not sure what sort order you want. With this data, what order do you want them it

ABCD1034
ABCD123
BRFQ1034
ABCD286
ABCD2015
ABCD386
BRFQ280
 
Upvote 0
I'm not sure what sort order you want. With this data, what order do you want them it

ABCD1034
ABCD123
BRFQ1034
ABCD286
ABCD2015
ABCD386
BRFQ280



ABCD123
BRFQ280
ABCD286
ABCD386
ABCD1034
BRFQ1034
ABCD2015

This is how I would want it. Please note all the letters will be the same
 
Upvote 0
kidwispa's solution works best, except you'll have to change the first 4 to a 5:
=MID(A2,5,4)
 
Upvote 0

Forum statistics

Threads
1,224,560
Messages
6,179,520
Members
452,922
Latest member
nstaab07

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