Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Sort 1

Status
Not open for further replies.

E1Designs

IS-IT--Management
Oct 20, 2005
201
US
I have a list:

A
A1
B
B1
C
C1
A
B

I need it to be sorted like this:

A
A
B
B
C
A1
B1
C1

etc...
 
I don't think you'll be able to do it with Excel's native functionality. But you could use a 'helper column'.

Say your data is in Column A. In column B, enter this formula:
[COLOR=blue white]=LEN(A2)&A2[/color] (assuming row 1 contains header data)

Then sort by column B.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
That does not seem to be giving the correct results. ;/
 
It works fine on the example data you provided.

Do you have other datatypes? Maybe you have A2 and you want that sorted after C1?

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
And maybe you forgot to copy down the formula ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Or try this:

Data is in Column A. In column B2, enter this formula:
=LEN(A2) (assuming row 1 contains header data) and copy down the formula.

Then sort by column B,A.
 
wellas666,

I don't see how that would work any differently than my suggestion.

Are you still having trouble, E1Designs?

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top