sub thecode()
' passe chaque cellule en rouge
'si supérieur au calcul
'sinon en vert
Application.ScreenUpdating = False
Dim c As Range
For Each c In Range('selection_de_zone')
If c.Value > Val(Range('ma_selection').Value) / 12 Then
c.Interior.ColorIndex = 3 'rouge
Else
c.Interior.ColorIndex = 4 ' en vert
End If
Next c
end sub
Message édité par: olivierd, à: 24/03/2005 12:10