Bonjour,
Ma petite contribution.
Cdlt
Option Explicit
Sub Detection0()
Dim sH_1 As Worksheet, sH_2 As Worksheet
Dim D1 As Date, D2 As Date
Dim Plage As Range
Dim derLigne As Long
Dim Cel As Range
Application.ScreenUpdating = False
Set sH_1 = Worksheets("lancement")
Set sH_2 = Worksheets("suivi")
D1 = sH_1.Cells(1, 13)
D2 = sH_1.Cells(2, 13)
With sH_2
derLigne = .Range("G" & Rows.Count).End(xlUp).Row
Set Plage = Range(.Cells(2, 7), .Cells(derLigne, 7))
For Each Cel In Plage
If Not IsEmpty(Cel) And IsDate(Cel.Offset(0, 1)) Then
If Cel.Offset(0, 3) > D1 Or Cel.Offset(-1, 1) < (D1 + 14) _
Or Left(Cel.Offset(0, 5), 3) = "CPT" Or Cel.Offset(0, 3) < D2 Then
Cel.Offset(0, 17) = 0
Else
Cel.Offset(0, 17) = 1
End If
End If
Next Cel
End With
Set sH_1 = Nothing: Set sH_2 = Nothing: Set Plage = Nothing
End Sub