I want to sort some rows only, HELP Please..
Like this for EX.
Code:
Sub xx1()On Error Resume Next
With Worksheets("Jan").Sort
.SortFields.Clear
.SortFields.Add Key:=Range("e:e"), _
SortOn:=xlSortOnValues, _
Order:=xlAscending, _
DataOption:=xlSortNormal
.SortFields.Add Key:=Range("e14;e26"), _
SortOn:=xlSortOnValues, _
Order:=xlDescending, _
DataOption:=xlSortNormal
.SetRange Range("e14:ch73")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Like this for EX.
Code:
Sub xx1()On Error Resume Next
With Worksheets("Jan").Sort
.SortFields.Clear
.SortFields.Add Key:=Range("e:e"), _
SortOn:=xlSortOnValues, _
Order:=xlAscending, _
DataOption:=xlSortNormal
.SortFields.Add Key:=Range("e14;e16;e18;e20;e22;e24;e26"), _
SortOn:=xlSortOnValues, _
Order:=xlDescending, _
DataOption:=xlSortNormal
.SetRange Range("e14:ch73;e16:ch73;e18:ch73;e20:ch73;e22:ch73;e24:ch73;e26:ch73")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub