I'm trying to sort each row in selection. Example:
before sorting:
8 3 17
2 9 4
5 3 8
after sorting:
3 8 17
2 4 9
3 5 8
I wrote this code, but it not works:
Public Sub SortByString()
Dim row As Range
For Each row In Selection.Rows
row.Sort Key1:=row, Order1:=xlAscending, Orientation:=xlSortColumns
Next row
End Sub
I'm newbie in VBA. Than I doing wrong? Please help.