twelvety
03-03-2009, 03:41 AM
Hi experts,
I have found out through this forum that I can reverse the order of columns using this code;
Sub reverse()
Dim counti As Integer
Dim countj As Integer
Application.ScreenUpdating = False
counti = Cells(Selection.Row, Columns.Count).End(xlToLeft).Column
For countj = counti - 1 To 1 Step -1
Columns(countj).Cut
Columns(counti + 1).Insert
Next countj
Application.ScreenUpdating = True
End Sub
Is anyone able to provide me with some code to reverse the order of rows?
Thanks in advance
I have found out through this forum that I can reverse the order of columns using this code;
Sub reverse()
Dim counti As Integer
Dim countj As Integer
Application.ScreenUpdating = False
counti = Cells(Selection.Row, Columns.Count).End(xlToLeft).Column
For countj = counti - 1 To 1 Step -1
Columns(countj).Cut
Columns(counti + 1).Insert
Next countj
Application.ScreenUpdating = True
End Sub
Is anyone able to provide me with some code to reverse the order of rows?
Thanks in advance