petit retour avec la macro
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Réf_Zone As Integer
If Target.Count > 1 Then Exit Sub
With Sheets("Stations")
If Not Application.Intersect(Target, Range("H6:H138")) Is Nothing Then
Réf_Zone = .Range("B" & Application.WorksheetFunction.Match(Target, .Range("A:A"), 0))
If Réf_Zone = 1 Then
Target.Interior.ColorIndex = 37
Else
If Réf_Zone = 2 Then
Target.Interior.ColorIndex = 6
Else
If Réf_Zone = 3 Then
Target.Interior.ColorIndex = 43
Else
Target.Interior.ColorIndex = 3
End If
End If
End If
End If
End With
End Sub
erreur a la ligne
Réf_Zone = .Range("B" & Application.WorksheetFunction.Match(Target, .Range("A:A"), 0))
quand je supprime la station la couleur reste est il possible d'avoir la cellule en blanc si vide
a part ce souci la macro me convient Yvouille
cordialement