جرب هذا الماكرو
Option Explicit
Dim arr
Sub coloriz_row(My_row)
arr = Array("معلم", "معلم اول ا", _
"معلم خبير", "مدير عام", "معلم اول")
Cells(My_row, 1).Resize(, 3).Interior.ColorIndex = 3
End Sub
'================================
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Row > 2 Then
Cells(Target.Row, 1).Resize(, 3).Interior.ColorIndex = 0
End If
If Target.Column = 3 And _
Target.Count = 1 And _
Target.Row > 2 And _
IsError(Application.Match(Target.Value, arr, 0)) Then
Cells(Target.Row, 1).Resize(, 3).Interior.ColorIndex = 0
coloriz_row (Target.Row)
End If
Application.EnableEvents = True
End Sub