Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B2:F5,J2:M5")) Is Nothing Or Target.Count > 1 Then Exit Sub
Application.EnableEvents = False
Select Case Target.Column
Case Is < 7
b = IsNumeric(Application.Match(Target, Array("d", "h", "r"), 0)) + IsNumeric(Target)
If Not b Then
MsgBox "Mag niet"
Application.Undo
Else
If IsNumeric(Target) And Target > 0 And Target.Offset(, 7) = 0 Then Target.Offset(, 7).Interior.Color = vbRed
End If
Case Else
If Not IsNumeric(Target) Then
MsgBox "mag niet"
Application.Undo
Else
If Target > 0 And Target.Offset(, -7) = "" Then Target.Offset(, -7).Interior.Color = vbRed
End If
End Select
Application.EnableEvents = True
End Sub