sort cells with "mixed content" (number + text) like numbers

PeteWright

Well-known Member
Joined
Dec 20, 2020
Messages
506
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
Hello,

I would like to sort some data, but it's mixed (numbers, numbers + text).

To keep it simple here's some dummy data:

123
234
345
456
123 456
234 567
345 678
123 ABC
456 XYZ

Right now numbers and everything else is sorted separately. What I would like to achieve is the following order:

123
123 456
123 ABC
234
234 567
345
345 678
456
456 XYZ

I wonder if this is even possible. I also wouldn't mind helper cells.

Many thanks in advance
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
How about
Fluff.xlsm
AB
1
2123123
3234123 456
4345123 ABC
5456234
6123 456234 567
7234 567345
8345 678345 678
9123 ABC456
10456 XYZ456 XYZ
Sheet6
Cell Formulas
RangeFormula
B2:B10B2=SORTBY(A2:A10,TEXTBEFORE(A2:A10," ",,,1))
Dynamic array formulas.
 
Upvote 0
Yes, use a helper column
in B1
=LEFT(A1&" ",7)
The above aligns each row of data
and copy down

Now sort on column B
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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