Bonjour,
La macro "Contrôle modifiée:
Sub Controle()
Dim DerLig As Long, i As Long, j As Long
Dim Machine As String
Dim Heure_Deb As Date, Heure_Fin As Date, Date_J As Date
Application.ScreenUpdating = False
DerLig = Range("A" & Rows.Count).End(xlUp).Row
Range(Cells(2, "C"), Cells(DerLig, "G")).Interior.ColorIndex = xlNone
For i = 2 To DerLig - 1
Date_J = Cells(i, "B")
Machine = Cells(i, "C")
Heure_Deb = Cells(i, "D")
Heure_Fin = Cells(i, "E")
For j = i + 1 To DerLig
If Cells(j, "C") = Machine Then
If Cells(j, "D") < Heure_Fin And Cells(j, "E") >= Heure_Deb And Date_J = Cells(j, "B") Then
Range(Cells(i, "C"), Cells(i, "G")).Interior.Color = RGB(146, 208, 80)
Range(Cells(j, "C"), Cells(j, "G")).Interior.Color = RGB(146, 208, 80)
End If
End If
Next j
Next i
End Sub
Cdlt