Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort Errors
Help! I can't get a sort to run correctly; both are "sort method of range
class failed"; I'm running this on Excel 2003 This is a macro-based code: Columns("D:D").Select Range("B1:U500").SORT Key1:=Range("D1"), Order1:=xlDescending, Key2:= _ Range("E1"), Order2:=xlAscending, Key3:=Range("G1"), Order3:=xlAscending _ , Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:= _ xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortTextAsNumbers _ , DataOption3:=xlSortNormal I also can't get this (preferred) code to work: With ActiveSheet Dim Rng As Range Set Rng = .Range(.Range("U1"), .Cells(Rows.Count, "B").End(xlUp)) Rng.SORT Key1:=.Cells(2, "D"), Order1:=xlDescending, Key2:=.Cells(2, "E"), Order2:=xlAscending, Key3:=.Cells(2, "G"), Order3:=xlAscending, MatchCase:=False, Header:=xlYes End With Suzanne |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Throwing Circular Errors When No Errors Exist | Excel Worksheet Functions | |||
Trying to sort by row and getting errors. | New Users to Excel | |||
Sort creating total errors | Excel Discussion (Misc queries) | |||
how do I sort email address, dedupes,check for errors in a docume. | Excel Discussion (Misc queries) | |||
Unresolved Errors in IF Statements - Errors do not show in results | Excel Worksheet Functions |