H
Helmut
Help...I am getting ERROR on ".Apply"
Sub Sort()
' Set Range for Sorting
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
Set Rng = Range("A11:J" & lastrow)
Rng.Select
Range("A11").Activate
ActiveSheet.Sort.SortFields.Clear
ActiveSheet.Sort.SortFields.Add _
Key:=Rng _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveSheet.Sort
.SetRange Rng
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Sub Sort()
' Set Range for Sorting
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
Set Rng = Range("A11:J" & lastrow)
Rng.Select
Range("A11").Activate
ActiveSheet.Sort.SortFields.Clear
ActiveSheet.Sort.SortFields.Add _
Key:=Rng _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveSheet.Sort
.SetRange Rng
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub