Sub crea_CCF_M_GRP()
Dim couleur&, x&, xx&, i%, rest(), n%, col%, lig&
With Sheets("Liste")
couleur = .[M14].Interior.Color
x = 4
xx = 11
For i = 1 To 31
ReDim rest(1 To 4) 'tableau, plus rapide
n = 0 'RAZ
For col = 2 To 4
For lig = x To x + 30
If .Cells(lig, col).Interior.Color = couleur Then
n = n + 1
If n < 5 Then rest(n) = .Cells(lig, col)
End If
Next lig, col
.Cells(xx, 6).Resize(, 4) = rest 'décharge du tableau
x = x + 34
xx = xx + 9
Next i
End With
End Sub