# Sorting in Excel

#### VQCHEESE

##### Board Regular
I have a column that i need to sort by. its a number column

right now it looks like this. Is there a way i can get it like this:
1300 1300
1301 1301
1500 13002
1804 1500
6004 15000
8002 1804
13002 18045
15000 6004
18045 8002
80001 80001
80004 80004

is there any way to sort like that?

### Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
If your data is in Column A and you insert a column before it so that it is now in column B you can insert this formula into Column A and copy it down the length of your data. Then sort on column A and delete column A for your final result.

=B1/((10)^LEN(B1)-1)

can you explain the logic of your sort? It's neither numeric or alpha sorted...

the reason behind my sort is because at our company we have producer numbers, but if they have more then one Bulktank that is the last number.
so if Producer X's number is 8000 but he has 4 bulk tanks then he has 4 differnt lab numbers ex...8000,80001,80002,80003, and we want them all to stay together when we sort

does that clarify?

yes, are the producer #'s always 4 digits?

Not all of them, but quite afew of them are

oh wait never mind i looked at the wrong comlumn yes ALWAYS 4 DIGITS

why does 1301 come before 13002 in your example shouldn't it be 1300, 13002, 1301?

Yeah thats my mistake yes it should.
are you geting anywhere with this one?

if that's the case Excelenator's formula should have worked for you, I only continued on because I thought it was producing the wrong result based on your bad example.

I would use the following personally, only because I'm too dim to get my head around what Excelenator is doing...

=IF(LEN(b1)>4,b1/10,b1)

hth,
Giacomo

Replies
3
Views
309
Replies
6
Views
200
Replies
9
Views
354
Replies
15
Views
573
Replies
19
Views
426

1,203,744
Messages
6,057,118
Members
444,906
Latest member
NanaExcel

### 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.

### Which adblocker are you using?

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

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