Excel Sorting

J

Judy

I need to know how to sort a group of numbers that have a different amount of
digits in them and may have dashes and letters. I have tried formatting the
cells as numbers, text, and general. None of that works. It always comes up
with the 3 digit numbers first, then 4 digit, then 5 etc. I need to be able
to sort it by 1st digit, then 2nd, then 3rd, etc.

Example

112
1134-blk
112563
1290-wht
1345
150
80-17068-03
 
L

Luke M

First, create a helper column to truly transform the data into text:
=TEXT(A2,"@")

Next, select both columns, and go to Data - Sort. Sort the helper column
Ascending, and at next dialogue, choose "Sort numbers and numbers stored as
text seperately". Will produce:

112
112563
1134-blk
1290-wht
1345
150
80-17068-03
 
J

Judy

OK I assumed that the formula should have the "A2" increasing as you move
down the rows?
 
B

Billns

OK I assumed that the formula should have the "A2" increasing as you move
down the rows?
Yes, Luke's formula assumes the first number is in cell A2 with the
other numbers following below.

Bill
 
J

Judy

I cannot get it to fill down while increasing the number. What is the
secret? I tried the things that I normally do without success.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top