Private Sub Worksheet_Change(ByVal Target As Range)
Dim bFound As Boolean
Dim rCell As Range
bFound = False
If Not Intersect(Target, Range("WED_AM_SER")) Is Nothing Then
For Each rCell In Sheet2.Range("S11:S800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("WED_PM_SER")) Is Nothing Then
For Each rCell In Sheet2.Range("U11:U800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("THU_AM_SER")) Is Nothing Then
For Each rCell In Sheet2.Range("Z11:Z800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("THU_PM_SER")) Is Nothing Then
For Each rCell In Sheet2.Range("AB11:AB800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("FRI_AM_SER")) Is Nothing Then
For Each rCell In Sheet2.Range("AG11:AG800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("FRI_PM_SER")) Is Nothing Then
For Each rCell In Sheet2.Range("AI11:AI800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("SAT_AM_SER")) Is Nothing Then
For Each rCell In Sheet2.Range("AN11:AN800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("SAT_PM_SER")) Is Nothing Then
For Each rCell In Sheet2.Range("AP11:AP800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("SUN_AM_SER")) Is Nothing Then
For Each rCell In Sheet2.Range("AU11:AU800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("SUN_PM_SER")) Is Nothing Then
For Each rCell In Sheet2.Range("AW11:AW800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("MON_AM_SER")) Is Nothing Then
For Each rCell In Sheet2.Range("E11:E800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("MON_PM_SER")) Is Nothing Then
For Each rCell In Sheet2.Range("G11:G800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("TUE_AM_SER")) Is Nothing Then
For Each rCell In Sheet2.Range("L11:L800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("TUE_PM_SER")) Is Nothing Then
For Each rCell In Sheet2.Range("N11:N800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("WED_AM_SERb")) Is Nothing Then
For Each rCell In Sheet2.Range("S11:S800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("WED_PM_SERb")) Is Nothing Then
For Each rCell In Sheet2.Range("U11:U800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("THU_AM_SERb")) Is Nothing Then
For Each rCell In Sheet2.Range("Z11:Z800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("THU_PM_SERb")) Is Nothing Then
For Each rCell In Sheet2.Range("AB11:AB800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("FRI_AM_SERb")) Is Nothing Then
For Each rCell In Sheet2.Range("AG11:AG800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("FRI_PM_SERb")) Is Nothing Then
For Each rCell In Sheet2.Range("AI11:AI800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("SAT_AM_SERb")) Is Nothing Then
For Each rCell In Sheet2.Range("AN11:AN800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("SAT_PM_SERb")) Is Nothing Then
For Each rCell In Sheet2.Range("AP11:AP800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("SUN_AM_SERb")) Is Nothing Then
For Each rCell In Sheet2.Range("AU11:AU800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("SUN_PM_SERb")) Is Nothing Then
For Each rCell In Sheet2.Range("AW11:AW800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("MON_AM_SERb")) Is Nothing Then
For Each rCell In Sheet2.Range("E11:E800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("MON_PM_SERb")) Is Nothing Then
For Each rCell In Sheet2.Range("G11:G800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("TUE_AM_SERb")) Is Nothing Then
For Each rCell In Sheet2.Range("L11:L800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("TUE_PM_SERb")) Is Nothing Then
For Each rCell In Sheet2.Range("N11:N800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("WED_AM_BUS")) Is Nothing Then
For Each rCell In Sheet4.Range("S11:S800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("WED_PM_BUS")) Is Nothing Then
For Each rCell In Sheet4.Range("U11:U800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("THU_AM_BUS")) Is Nothing Then
For Each rCell In Sheet4.Range("Z11:Z800")
If Trim(rCell.Value) = Trim(Target.Value) Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("THU_PM_BUS")) Is Nothing Then
For Each rCell In Sheet4.Range("AB11:AB800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("FRI_AM_BUS")) Is Nothing Then
For Each rCell In Sheet4.Range("AG11:AG800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("FRI_PM_BUS")) Is Nothing Then
For Each rCell In Sheet4.Range("AI11:AI800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("SAT_AM_BUS")) Is Nothing Then
For Each rCell In Sheet4.Range("AN11:AN800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("SAT_PM_BUS")) Is Nothing Then
For Each rCell In Sheet4.Range("AP11:AP800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("SUN_AM_BUS")) Is Nothing Then
For Each rCell In Sheet4.Range("AU11:AU800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("SUN_PM_BUS")) Is Nothing Then
For Each rCell In Sheet4.Range("AW11:AW800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("MON_AM_BUS")) Is Nothing Then
For Each rCell In Sheet4.Range("E11:E800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("MON_PM_BUS")) Is Nothing Then
For Each rCell In Sheet4.Range("G11:G800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("TUE_AM_BUS")) Is Nothing Then
For Each rCell In Sheet4.Range("L11:L800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("TUE_PM_BUS")) Is Nothing Then
For Each rCell In Sheet4.Range("N11:N800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("WED_AM_BUSb")) Is Nothing Then
For Each rCell In Sheet4.Range("S11:S800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("WED_PM_BUSb")) Is Nothing Then
For Each rCell In Sheet4.Range("U11:U800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("THU_AM_BUSb")) Is Nothing Then
For Each rCell In Sheet4.Range("Z11:Z800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("THU_PM_BUSb")) Is Nothing Then
For Each rCell In Sheet4.Range("AB11:AB800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("FRI_AM_BUSb")) Is Nothing Then
For Each rCell In Sheet4.Range("AG11:AG800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("FRI_PM_BUSb")) Is Nothing Then
For Each rCell In Sheet4.Range("AI11:AI800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("SAT_AM_BUSb")) Is Nothing Then
For Each rCell In Sheet4.Range("AN11:AN800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("SAT_PM_BUSb")) Is Nothing Then
For Each rCell In Sheet4.Range("AP11:AP800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("SUN_AM_BUSb")) Is Nothing Then
For Each rCell In Sheet4.Range("AU11:AU800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("SUN_PM_BUSb")) Is Nothing Then
For Each rCell In Sheet4.Range("AW11:AW800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("MON_AM_BUSb")) Is Nothing Then
For Each rCell In Sheet4.Range("E11:E800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("MON_PM_BUSb")) Is Nothing Then
For Each rCell In Sheet4.Range("G11:G800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("TUE_AM_BUSb")) Is Nothing Then
For Each rCell In Sheet4.Range("L11:L800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
If Not Intersect(Target, Range("TUE_PM_BUSb")) Is Nothing Then
For Each rCell In Sheet4.Range("N11:N800")
If Trim(rCell.Value) = Trim(Target.Value) _
Then
bFound = True
Exit For
End If
Next rCell
If Not bFound _
Then
MsgBox "There is an AVAILABILITY CONFLICT with this Employee", vbCritical
End If
End If
End Sub