1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| Sub essai()
Dim i As Long, z As Long
Application.ScreenUpdating = False
Sheets("feuil1").Activate
For i = 2 To Range("d65535").End(xlUp).Row
With Sheets("feuil2")
.Cells(i, 1) = Cells(i, 4): .Cells(i, 2) = Cells(i, 1): .Cells(i, 3) = Cells(i, 2): .Cells(i, 4) = Cells(i, 3)
End With: Next i
z = Sheets("feuil2").Cells.Find("*", , , , , xlPrevious).Row
For i = 2 To Range("e65535").End(xlUp).Row
With Sheets("feuil2")
.Cells(i + z, 1) = Cells(i, 5): .Cells(i + z, 2) = Cells(i, 1): .Cells(i + z, 3) = Cells(i, 2): .Cells(i + z, 4) = Cells(i, 3)
End With: Next i
Sheets("feuil2").Activate: [a2:d10000].Sort Key1:=Range("a2"), Order1:=xlAscending, Header:=xlGuess
End Sub |
Partager