Sorting

17-May-06 01:11 AM
How do you sort a list with more than three sort keys?

Sorting

17-May-06 08:07 AM
First sort on least significant key(s)



Then sort on most significant keys



HTH



--



AP

Sorting

17-May-06 08:51 AM
You need a helper column.  In this should be a formula concatenating all the



fields to be sorted.



=A1&B1&C1 ...



This will sort only in ascending order.  You will need to include the value



of dates (not the actual dates) -



&VALUE(A1) or &VALUE("01/04/2006") as applicable



Regards.



Bill Ridgeway



Computer Solutions

Sorting

17-May-06 09:57 AM
I've had a re-think on this.



You need a helper column.  In this should be a formula concatenating all the



fields to be sorted.



=A1&B1&C1 ...



This will sort the whole in ascending or descending order only.  You will



need to include the value of dates (not the actual dates) -



&VALUE(A1) or &VALUE("01/04/2006") as applicable



If you need to sort in descending order you will have to use a separate sort



key.



Regards.



Bill Ridgeway



Computer Solutions
Sorting
17-May-06 08:23 AM
The other solution is the more correct solution.  Your solution



with concatenation is really only valid if each part in the concatenation



has a consistent length.   Consider the following list.  Correctly in sequence.



AA    B



AA    BC



AAA B



Sorting the concatenation could produce incorrect results as in:



AAAB



AAB



AABC



---



HTH,



David McRitchie, Microsoft MVP - Excel    [site changed  Nov. 2001]



My Excel Pages:  http://www.mvps.org/dmcritchie/excel/excel.htm



Search Page:        http://www.mvps.org/dmcritchie/excel/search.htm
Post Question To EggHeadCafe