Forum Discussion

waterguy05's avatar
waterguy05
Copper Contributor
Jan 05, 2023
Solved

Convert name string to new format

Hello, I am trying to create a function that rearranges how names are automatically produced in Excel.

 

There are instances where there is a middle name letter, full middle name, or no middle name. Here are the three types:

Doe, John Apple (0000)
Doe, John (0000)
Doe, John A (0000)

No matter how it looks, I want the output to be:
John Doe

Any ideas? Thanks!

  • waterguy05 

    =CONCATENATE(MID(A1,SEARCH(", ",A1)+2,SEARCH(" ",A1,SEARCH(", ",A1)+2)-SEARCH(", ",A1)-2)," ",LEFT(A1,SEARCH(", ",A1)-1))

     

    You can try this formula.

Resources