Re : Couleur en fonction de la valeur
Merci
A vous je post le script non fini si ca interresse quelqu'un (C'est une todo list)
Private Sub Worksheet_Change(ByVal Target As Range)
'Insertion automatique de la date et ID
If Target.Cells.Column = "4" Then
Range("C" & Target.Cells.Row) = Date
Range("I" & Target.Cells.Row) = "KO"
Compteur = Range("B" & Target.Cells.Row - 1).Value
Range("B" & Target.Cells.Row).Value = Compteur + 1
End If
'Mise en forme en fonction de l'état Côté DEV
'Etat ok
If Range("I" & Target.Cells.Row) = "OK" Then
For n = 3 To 9
Cells(Target.Row, n).Interior.ColorIndex = 14
Cells(Target.Row, n).Font.ColorIndex = 2
Next
End If
'Etat ko
If Range("I" & Target.Cells.Row) = "KO" Then
For n = 3 To 9
Cells(Target.Row, n).Interior.ColorIndex = 15
Cells(Target.Row, n).Font.ColorIndex = 1
Next
End If
'Etat pec
If Range("I" & Target.Cells.Row) = "PEC" Then
For n = 3 To 9
Cells(Target.Row, n).Interior.ColorIndex = 55
Cells(Target.Row, n).Font.ColorIndex = 2
Next
End If
'Etat vide
If Range("I" & Target.Cells.Row) = "" Then
For n = 3 To 9
Cells(Target.Row, n).Interior.ColorIndex = xlNone
Cells(Target.Row, n).Font.ColorIndex = 54
Next
End If
End Sub