Sub copycolumns()
Dim fin As Long
Dim efin As Long
fin = Feuil1.Cells(Rows.Count, 1).End(xlUp).Row
For j = 2 To 9 <=================== #je veux changer cette boucle par une une boucle qui dépend du temps#
For i = 1 To fin
If Feuil1.Cells(i, j).Value <> Feuil1.Cells(i, j + 1).Value Then
Feuil1.Cells(i, 1).Copy
efin = Feuil2.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Feuil1.Paste Destination:=Worksheets("Feuil2").Cells(efin, 1)
Feuil1.Cells(i, j).Copy
Feuil1.Paste Destination:=Worksheets("Feuil2").Cells(efin, 2)
Feuil1.Cells(i, j + 1).Copy
Feuil1.Paste Destination:=Worksheets("Feuil2").Cells(efin, 3)
End If
Next i
Next j
Application.CutCopyMode = False
Feuil2.Columns().AutoFit
Range("A1").Select
End Sub