جرب لعله يكون مفيدا
Private Sub Worksheet_Change(ByVal Target As Range)
' تحقق إذا كانت التغييرات داخل النطاق المطلوب
If Not Intersect(Target, Me.Range("E10:E1009")) Is Nothing Then
' ضبط الأسماء قبل عملية الأبجدة
Dim ch As Variant
Application.ScreenUpdating = False
With Me.Range("E10:E1009")
For Each ch In Array("إ", "أ", "آ")
.Replace CStr(ch), "ا", , , True
Next
.Replace "ة", "ه", , , True
.Replace "ي ", "ى ", , , True
End With
' إزالة المسافات الزائدة
Dim lr As Long, i As Long
lr = Me.Cells(Me.Rows.Count, 5).End(xlUp).Row
For i = 10 To lr
Do While InStr(Me.Cells(i, 5), " ") > 0
Me.Cells(i, 5).Value = Replace(Me.Cells(i, 5), " ", " ")
Loop
Me.Cells(i, 5).Value = Trim(Me.Cells(i, 5).Value)
Next i
Application.ScreenUpdating = True
End If
End Sub