A
Ayo
Can someone help me with this? The first sort works fine but the second sort
gives me an errormessage: The sort reference is not valid. Make sure that
it's within the data you want to sort, and the first Sort Box isn't the same
of Blank.
What does that mean?
Sheets("Sheet1").Select
ClastRow = ActiveSheet.Cells(Rows.Count, "D").End(xlUp).Row
ActiveSheet.Range("D2:G" & ClastRow).Select
Selection.Sort Key1:=Range("D2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("D2").Select
Sheets("BulkUploadReport 1 ").Select
ClastRow = ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Row
ActiveSheet.Range("A2:O" & ClastRow).Select
Selection.Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("B2").Select
gives me an errormessage: The sort reference is not valid. Make sure that
it's within the data you want to sort, and the first Sort Box isn't the same
of Blank.
What does that mean?
Sheets("Sheet1").Select
ClastRow = ActiveSheet.Cells(Rows.Count, "D").End(xlUp).Row
ActiveSheet.Range("D2:G" & ClastRow).Select
Selection.Sort Key1:=Range("D2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("D2").Select
Sheets("BulkUploadReport 1 ").Select
ClastRow = ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Row
ActiveSheet.Range("A2:O" & ClastRow).Select
Selection.Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("B2").Select