Hello,
i have a spreadsheet with 1124 rows and would like to write a macro to sort ascending every even row. For example after running the macro i want it to sort row2, then jump to and sort row4, row6 and so on..
I have digged a macro from your forum which works really nice except it sorts EVERY row in a range.
Any help will be greatly appreciated!
Here is the macro which you can revise:
Sub Sort_Test()
Dim RgToSort As Range
Dim RgRow As Range
Dim x As Long
Set RgToSort = Range(Range(“A1:AE1124”), Range(“A1:AE1124”).End(xlDown))
For Each RgRow In RgToSort.Rows
RgRow.Sort Key1:=Range(RgRow.Item(1).Address), Order1:=xlAscending, Orientation:=xlLeftToRight, OrderCustom:=1
Next
End Sub
Btw, i am using excel 2007 if it makes any difference.
Thanks in advance for every help.