Bonjour DucLorenzo, U.Milité,
un début vite fait, à tester et, sûrement, à améliorer!
Private Sub Worksheet_Change(ByVal Target As Range)
'
iRow = Target.Row
iCol = Target.Column
If iRow Mod 9 = 8 Or iRow Mod 9 < 6 Then
iFlag = IIf(iRow Mod 9 = 8, 8 + Int(iRow / 9) * 9, 8 + (Int(iRow / 9) - 1) * 9)
If (iRow >= iFlag And iRow <= iFlag + 6) And Cells(iRow, 7) > 12 Then
Range("C" & iRow & ":G" & iRow).Font.Color = RGB(255, 0, 0)
sFlag1 = "ATTENTION ! Valeur dépassée : " & Cells(iRow, 7)
End If
If Cells(iFlag + 8, 3) > 60 Then
Range("C" & iFlag + 8).Font.Color = RGB(255, 0, 0)
sFlag2 = "ATTENTION ! Valeur dépassée : " & Cells(iFlag + 8, 3)
End If
If sFlag1 <> "" Or sFlag2 <> "" Then
MsgBox sFlag1 & Chr(10) & sFlag2
Range("C" & iFlag + 8).Font.Color = RGB(0, 0, 0)
Range("C" & iRow & ":F" & iRow).Font.Color = RGB(25, 35, 180)
Range("G" & iRow).Font.Color = RGB(0, 0, 0)
End If
End If
'
End Sub
A+