Hi,
implement the macro below.
First select the matrix you want to sort. Then run the macro.
That should fix it.
Kind regards
Bjorn
Sub Sort1()
Dim rr As Integer, rng1 As Range, rng2 As Range, maxcol As Integer
Set rng1 = Selection
maxcol = rng1.Columns.Count
For rr = 1 To rng1.Rows.Count
Set rng2 = Range(rng1.Cells(rr, 1), rng1.Cells(rr, maxcol))
rng2.Sort Key1:=rng2.Cells(1, 1), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight, _
DataOption1:=xlSortNormal
Next rr
End Sub
|