Please put your code in tags.
Try this,
![]()
Sub sort() Dim iRow As Long Dim FirstRow As Long Dim LastRow As Long With Worksheets("sheet1") FirstRow = 2 LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For iRow = FirstRow To LastRow With .Cells(iRow, 2).Resize(, 5) .sort Key1:=.Columns(1), Order1:=xlAscending, _ Header:=xlNo, OrderCustom:=1, MatchCase:=False, _ Orientation:=xlLeftToRight End With Next iRow End With End Sub
Bookmarks