When after hightlighting the range, selecting the option to sort left to right, only the first row of columns is sorted left to right. My issue is sorting the other 600 rows and their column contents, i.e.
With Worksheets("sheet1")
Set myRng = .Range("a5:AD661")
For Each myRow In myRng.Rows
With myRow
.Sort Key1:=.Cells(1), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlLeftToRight
End With
Next myRow
End With
End Sub
(Adjust those columns to match your data--I used a5:AD661).
With Worksheets("sheet1")
Set myRng = .Range("a1:AD661")
For Each myRow In myRng.Rows
With myRow
.Sort Key1:=.Cells(1), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlLeftToRight
End With
Next myRow
End With
End Sub
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.