Sub essai()
f_rapport = "Rapport"
l = 8
c = 5
n = 3'adapter en fonction du résultat voulu
Dim date_de As Date
Dim date_a As Date
date_de = Sheets(f_rapport).Cells(5, 5)
date_a = Sheets(f_rapport).Cells(6, 5)
l2 = 26
While Sheets(f_rapport).Cells(l, c) <> ""
feuille = Sheets(f_rapport).Cells(l, c)
With Sheets(feuille)
l1 = 8
c1 = 4
While .Cells(l1, c1) <> ""
date_fab = .Cells(l1, c1)
If date_fab >= date_de And date_fab <= date_a Then
l2 = l2 + 1
Sheets(f_rapport).Cells(l2, 1) = .Cells(l1, 1)
Sheets(f_rapport).Cells(l2, 2) = .Cells(l1, 2)
Sheets(f_rapport).Cells(l2, 3) = .Cells(l1, 3)
Sheets(f_rapport).Cells(l2, 4) = .Cells(l1, 4)
Sheets(f_rapport).Cells(l2, 4).NumberFormat = "dd/mm/yyyy"
Sheets(f_rapport).Cells(l2, 5) = .Cells(l1, 8)
Sheets(f_rapport).Range(Cells(l2, 1), Cells(l2, 5)).Interior.ColorIndex = n
End If
l1 = l1 + 1
Wend
End With
l = l + 1: n = n + 1
Wend
End Sub