Functions - again

  • Thread starter Thread starter Sandy
  • Start date Start date
S

Sandy

I would like to create a formulae change a text stream
that is first name last and make it last name first for
example

bob doe should be "doe bob"
also what do you do with initials such as bob t doe should
be doe bob t
 
To change "first last" to "last first", use:
=RIGHT(A4,LEN(A4)-FIND(" ",A4))&" "&LEFT(A4,FIND(" ",A4)-1)

Your second request isn't as simple. If your data truly has one initial
surrounded by spaces, you can find it with the formula:
=find(" ? ",a4)

If you could also have a full middle name, you can find its position with:
=find (" * ",a4)

Once you know its position in the string, you can apply the above logic to
switch the names around.
 
Back
Top