Its being requested please fix the code given below
the problem in this code is that any one of the given condition execute
and once it executed then other is not execute or in other words its stop working
even same condition will also not run that was executed first time.
Private Sub Worksheet_Change(ByVal Target As Range)
Set rngCheck = Range("D2:D1000")
Set rngBlock = Range("E2:E1000")
If Intersect(Target, rngBlock) Is Nothing Then
Application.EnableEvents = False
For Each rngToChk In Target
Select Case rngToChk.Value
Case "Best", "Worst"
If Target.Offset(0, -1) = "Best" Or Target.Offset(0, -1) = "Worst" Then
MsgBox "You cannot enter any value as Student's Column contains" _
& vbNewLine & "Best or Worst.", vbOKOnly, "Warning!"