السلام عليكم
وهذا كود اخر لإثراء الموضوع
Public Sub Extr_Ali()
Repl
Lr = Cells(Rows.Count, 1).End(xlUp).Row
For R = 1 To Lr
Cells(R, 2) = Ali_Strng(Cells(R, 1), 1)
Cells(R, 3) = Ali_Strng(Cells(R, 1), 0)
Next
End Sub
Private Function Ali_Strng(R As String, Bn As Boolean)
Dim Ta() As String
Dim S_E$, S_AR$
Dim Ad
Ta = Split(R, " ")
For I = 0 To UBound(Ta)
If Ta(I) <> "" Then
If Asc(Mid(Ta(I), 1, 1)) < 195 Then
S_E = S_E & Ta(I) & " "
Else
S_AR = S_AR & Ta(I) & " "
End If
End If
Next
If Bn Then Ad = S_AR Else Ad = S_E
Ali_Strng = Ad
End Function
Private Function Repl()
With ActiveSheet.UsedRange.Columns(1)
.Replace "-", "", xlPart
.Replace "(", "", xlPart
.Replace ")", "", xlPart
End With
End Function