Страница 2 из 2

Re: сортировка

Добавлено: 17 ноя 2010, 19:43
nilem
Ну, в принципе сортирует

Код: Выделить всё

For j = 1 To 11
    For i = 1 To 11
        With Worksheets("Лист1")
            If .Cells(j, 3).Value > .Cells(i, 3).Value Then
                temp = Range(.Cells(j, 1), .Cells(j, 3)).Value
                Range(.Cells(j, 1), .Cells(j, 3)).Value = Range(.Cells(i, 1), .Cells(i, 3)).Value
                Range(.Cells(i, 1), .Cells(i, 3)).Value = temp
            End If
        End With
    Next i
Next j