Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I am trying to sort a data range with more than 3 criteria. I have tried editing a recorded macro with 3 criteria and adding the 4th and it is not working. Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Key2:=Range("b2") _ , Order2:=xlAscending, Key3:=Range("D2"), Order3:=xlAscending, Key4:=Range("h2"), _ Order1:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=False, _ Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, _ DataOption3:=xlSortNormal End Sub Is there an error in my code or do I need a different approach? Thanks Matt |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sort Criteria | Excel Discussion (Misc queries) | |||
Saving sort criteria | Excel Discussion (Misc queries) | |||
Saving Sort Criteria (or Sort Lists) | Excel Worksheet Functions | |||
How do I get it to sort Criteria in A1:A6 and B1:B6 if both are c. | Excel Discussion (Misc queries) | |||
How to sort a sheet with more than three criteria | Excel Programming |