Sort Macro (2 levels)
try something like this
With Range("data1")
.Sort Key1:=.Range("A1"), Order1:=xlAscending, Key2:=.Range("B1") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=
_
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2 _
:=xlSortNormal
End With
--
Gary
"cgsteel" wrote in message
...
The code below sorts column "A" but if I wanted to add a level to the sort
that would sort column "B".
How would I do that?
Range("data1").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlNo
Thanks
Carlos
|