Re : VBA MeFC qui ne fonctionne pas
voici le code de ma macro
code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("B3")) Is Nothing Then
Dim plage As Range, Cell As Range
Set plage = Range("B3")
For Each Cell In plage
Cell.Interior.ColorIndex = Switch(Cell = "", -4142, Cell >= 0.05, 10, Cell >= 0.045, 46, Cell >= 0.04, 38, _
Cell >= 0.035, 27, Cell >= 0.03, 5, _
Cell < 0.03, 10)
Next Cell
End If
End Sub