alliejane
07-15-2007, 03:57 PM
I recorded a macro so that I could hopefully learn how to code it, but I'm having problems.
ActiveCell.Cells.Select
Selection.Sort Key1:=ActiveCell.Offset(0, 2).Range("A2"), Order1:= _
xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom, DataOption1:=xlSortTextAsNumbers
What am I doing wrong below?
ActiveCell.CurrentRegion.Select
Range("CurrentRegion").Sort Key1:=Range("C1")
ActiveCell.Cells.Select
Selection.Sort Key1:=ActiveCell.Offset(0, 2).Range("A2"), Order1:= _
xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom, DataOption1:=xlSortTextAsNumbers
What am I doing wrong below?
ActiveCell.CurrentRegion.Select
Range("CurrentRegion").Sort Key1:=Range("C1")