Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo errore
If Intersect([a4:a250], Target) Is Nothing Then Exit Sub
If Target.Value > 0 Then
Target.Offset(0, 1).Font.ColorIndex = xlAutomatic
Target.Offset(0, 2).Font.ColorIndex = xlAutomatic
Target.Offset(0, 3).Font.ColorIndex = xlAutomatic
Target.Offset(0, 4).Font.ColorIndex = xlAutomatic
Else
errore:
Target.Offset(0, 1).Font.ColorIndex = 16
Target.Offset(0, 2).Font.ColorIndex = 16
Target.Offset(0, 3).Font.ColorIndex = 16
Target.Offset(0, 4).Font.ColorIndex = 16
End If
End Sub |