ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sorting (https://www.excelbanter.com/excel-programming/321643-sorting.html)

Patrick Simonds

Sorting
 
Any one know of a way to sort by 4 key's

Key1:=Range("N2"), Order1:=xlAscending,

Key2:=Range("A2"), Order2:=xlAscending,

Key3:=Range("S2"), Order3:=xlAscending,

Key4:=Range("T2"), Order4:=xlAscending,



Myrna Larson

Sorting
 
Two sorts are required. Sort first by Key #4 (T2). Then sort a 2nd time with 3
keys, #1 = N2, #2 = A2, #3 = S2

On Tue, 25 Jan 2005 18:37:31 -0800, "Patrick Simonds"
wrote:

Any one know of a way to sort by 4 key's

Key1:=Range("N2"), Order1:=xlAscending,

Key2:=Range("A2"), Order2:=xlAscending,

Key3:=Range("S2"), Order3:=xlAscending,

Key4:=Range("T2"), Order4:=xlAscending,



Chris Ferguson

Sorting
 
How about adding another column say 'Z' and concatenate the other 4 columns
and then doing one sort on 'Z'?

Z2 = +N2 & A2 & S2 & T2

Chris


"Patrick Simonds" wrote in message
...
Any one know of a way to sort by 4 key's

Key1:=Range("N2"), Order1:=xlAscending,

Key2:=Range("A2"), Order2:=xlAscending,

Key3:=Range("S2"), Order3:=xlAscending,

Key4:=Range("T2"), Order4:=xlAscending,






All times are GMT +1. The time now is 01:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com