I am in a state of affairs the place I would like to jot down a handy formulation to assist velocity some issues up, and one in every of them is popping names from a wide range of codecs right into a single uniform format.
The names can appear like one in every of three circumstances:
Smith, John Fry, Philip J Inexperienced, Gregory (Greg)
I am attempting to jot down a formulation so the three circumstances would seem as follows:
John Smith Philip Fry Greg Inexperienced
I’ve written a few of a formulation, nevertheless I’ve gotten caught. What I’ve to this point is:
=IF(ISNUMBER(SEARCH("(",A7)),TEXTJOIN(" ",TRUE,MID(A7,SEARCH("(",A7)+1,SEARCH(")",A7)-SEARCH("(",A7)-1),LEFT(A7,FIND(",",A7,1)-1)),TEXTJOIN(" ",TRUE,"first",LEFT(A7,FIND(",",A7,1)-1)))
It is form of a large number, but it surely’s what I may get to this point. This can give me the next outcomes:
first Smith first Fry Greg Inexperienced
So I’ve bought a placeholder for grabbing the primary title when somebody doesn’t have a nickname in parentheses. Nevertheless, I can not seem to give you the remaining items of the formulation so as to have seize the primary title after the comma (and ensuing house), however ignoring any areas earlier than a center preliminary if it exists.
Can anybody assist me out or give some pointers? Thanks!