1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
   | Sub tableau()
Dim Cel As Range, Lg As Byte
Dim i As Long, L As Long, k As Long
Dim j As Long, nombre As Long
Dim lastrow As Long
   Application.ScreenUpdating = False
    k = Sheets("Synthèse").Cells.Find("*", , , , xlByRows, xlPrevious).Row
     lastrow = Sheets("parametrage").Cells.Find("*", , , , xlByRows, xlPrevious).Row
    With Sheets("parametrage")
 
        For Each Cel In .Range("a2:a171")
            With Sheets("Synthèse")
                For i = 6 To k
                    If .Cells(i, "A") <> Cel Then
                    worksheets("parametrage").Cells(lastrow + 1, 1).Value = _
                    Sheets("Synthèse").Cells(i, 1).Value
                    worksheets("parametrage").Cells(lastrow + 1, 2).Value = _
                    Sheets("Synthèse").Cells(i, "D").Value
                    worksheets("parametrage").Cells(lastrow + 1, 3).Value = _
                    Sheets("Synthèse").Cells(i, "E").Value
                    End If
                Next
            End With
 
        Next Cel
    End With
End Sub | 
Partager