Sub test()
tabloValid = Feuil2.Range("A2:C" & Feuil1.Cells(Rows.Count, 1).End(xlUp).Row)
Dim miniTablo()
Application.ScreenUpdating = False
For i = 1 To UBound(tabloValid)
    With Feuil2
       
       If .Cells(ligneID, 20) = Date _
       And .Cells(ligneID, 21) = Date Then
        .Cells(ligneID, 20) = ""
        .Cells(ligneID, 21) = ""
       Else
           
           ligneID = Application.Match(tabloValid(i, 1), .[A:A], 0)
           
           
            If tabloValid(i, 3) = "test" _
            And .Cells(ligneID, 20) = "" Then
            .Cells(ligneID, 20) = DateSerial(Year(Date), Month(Date) - 1, 1)
            End If
           
            If tabloValid(i, 3) = "test" _
            And .Cells(ligneID, 20) = Date Then
           
            If tabloValid(i, 3) = "" _
            And .Cells(ligneID, 20) = "" Then
           
             If tabloValid(i, 3) = "" _
            And .Cells(ligneID, 20) = Date Then
            .Cells(ligneID, 21) = DateSerial(Year(Date), Month(Date) - 1, 1)
                End If
               
               
                ReDim miniTablo(1 To 8)
                For x = 1 To 8
                    miniTablo(x) = tabloValid(i, x)
                Next x
                If tabloValid(i, 3) = "test" Then
                   
                   Feuil1.Cells(Rows.Count, 49).End(xlUp).Offset(1, 0).Resize(1, 8) = miniTablo
                End If
           
          
              
        End If
    End With
Next i
Application.ScreenUpdating = True
End Sub