I have some code for a macro that is designed to SORT multiple ROWS not columns. I have tweaked it a bit so that Column A would NOT be included in the sort of every row becuase it was a header row. However, I need only columns B through F sorted. Not Column G........I have got it to ignore column A, but how do I get it to ignore colum A and G?
Here is the code:
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, "B").Resize(1, 6)
.sort Key1:=.Columns(1), Order1:=xlAscending, _
Header:=xlNo, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlLeftToRight
End With
Next iRow
End With
End Sub
Bookmarks