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!

Consecutive sorts in Excel

Status
Not open for further replies.

dar149

MIS
Mar 5, 2002
117
US
I know that you can create a consecutive sort for four columns by sorting first by the two least important columns and then a second sort by the two most important columns. Example: The first sort is by LName and then by FName. The second sort is by Hours and then by Hourly Rate. If I want to add another consecutive sort it doesn't work. Is there a limit to the number of consecutive sorts Excel can handle?
 
I thought you could sort on 9 columns using the approach you outlined. Maybe I'm wrong.
 
Please explain what you mean exactly by:
If I want to add another consecutive sort it doesn't work.





Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
The theory is that using the Data>Sort dialog, you sort on the least significant fields first and then repeat the process on the more significant fields. Thisis because XL keeps the sequence of records it doesn't need to sort. I haven't looked at this recently but when I was learning XL i understood you do this process 3 times, giving the ability to sort on 9 fields. I don't really know whether 9 is the limit. I don't really see why you can't continue the process indefinitely.
 
Er, you haven't said what you mean by it doesn't work. If fact you've said exactly what I thought ... I don't really see why you can't continue the process indefinitely.

So, what's the problem??????

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Pretty sure you can.

Other options include creating a helper column(s) that concatenate the ones you want to sort on and then just sorting based on that column.

Regards
Ken............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
What I mean by "it doesn't work" is that it sorts the first two times I bring up the data sort dialog box. But the third time I bring it up it resorts the spreadsheet, wiping out the two previous sorts. It starts over as a new sort.
 


Back in the "old days" of 80-column punch cards, you could sort all 80 columns, using a card sorter that only sorted on ONE COLUMN, by sorting 80 times; from the lease significant column to the most significant column.


Skip,
[sub]
[glasses] [red]Be Advised![/red]
A wee deranged psychic may be runnin' around out there!
SMALL MEDUIM @ LARGE[tongue][/sub]
 
Hi dar149,

you've said it wipes out the previous 2 sorts ... it will sort more significantly than the previous sorts. Can you explain exactly what happened and exactly what you expect?

Otherwise, do what Ken recommended ( make a sort key yourself but joining fields together ).

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top