Dim j As Integer
Name = Trim (ten)
For j = Len (Name) To 1 Step -1
If Mid (Name, j, 1) = "" Then
If lg = "1" Then
TACH = Right (Name, Len (Name) - j)
Else
TACH = Left (Name, j)
End If
Exit For
End If
Next
End Function
Step 4: Save the code file by pressing Ctrl + S or clicking the Save icon , a dialog box appears informing you press Yes to save the file.
Step 5: Return to the Excel worksheet, first create more columns containing the First name Middle name and the First name column column after separating.
Step 6: Separate them and middle name : you put your cursor at a new cell in the column Name Buffer and enter the formula = TACH ( C5 ; 0) with C5 is complete box full name and press Enter .
With other middle names you do the same or copy down to the remaining cells, the result you will be able to separate all the middle names.
Step 7: Split the name : you put the cursor in the new cell in the First name column and enter the formula = TACH ( C5 ; 1) with C5 is the full name cell and press Enter .
With other names you do the same or copy down the remaining cells, the result you will separate all names.
So, with three ways of separating first and last name in Excel that the tutorial, you can easily perform separated first and last name. Good luck!