Easy one...
Try this UDF:
Function swapit(r As Range) As String
s = Split(r.Value, " ")
If UBound(s) = 2 Then
swapit = s(2) & " " & s(0) & " " & s(1)
Else
swapit = s(1) & " " & s(0)
End If
End Function
--
Gary''s Student - gsnu200742
"NWO" wrote:
Ok, I have a list of names in the fomrat John A Doe, Joan Bennett, etc (no
commas, some have middle initial, some don't). How do I get Doe John A, and
Bennett Joan (last name first name middle initial - commas OK) I tried the
Pearson example, but it had commas and the last name was first, so it didn't
work for my problem.
Thank you.
NWO Mark
|