T
Trish Smith
Hi everyone particularly those of you who helped in my original post,
http://www.microsoft.com/office/com...&p=1&tid=4777b66d-48fd-478c-a28f-f514966f3897
Here's what I asked
I'm very new to this and thought that as a challenge to myself I would try
to set up code to split FullName in Column A to First, Middle and Surname in
B,C and D.
I'd normally do this using formulas that I copy down the range from Peter
Noneley's xlfdic02
Firstname - =LEFT(A1,FIND(" ",A1,1)) in B1
Middlename - =LEFT(RIGHT(A1,LEN(A1)-FIND(" ",A1,1)),FIND("
",RIGHT(A1,LEN(A1)-FIND(" ",A1,1)),1)) in C1
Surname - =RIGHT(A1,LEN(A1)-FIND("#",SUBSTITUTE(A1,"
","#",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))) in D1
Thanks to all of you who answered especially the additional questions about
how the code worked.
I realised too late that although the code was splitting the string
beautifully (and so fast) that if the string had just firstname and surname
then the surname was being placed in column C and C was then a mixture of
Surname and Middle name.
If anyone could help me any further with this I would be over the moon
Thank you
http://www.microsoft.com/office/com...&p=1&tid=4777b66d-48fd-478c-a28f-f514966f3897
Here's what I asked
I'm very new to this and thought that as a challenge to myself I would try
to set up code to split FullName in Column A to First, Middle and Surname in
B,C and D.
I'd normally do this using formulas that I copy down the range from Peter
Noneley's xlfdic02
Firstname - =LEFT(A1,FIND(" ",A1,1)) in B1
Middlename - =LEFT(RIGHT(A1,LEN(A1)-FIND(" ",A1,1)),FIND("
",RIGHT(A1,LEN(A1)-FIND(" ",A1,1)),1)) in C1
Surname - =RIGHT(A1,LEN(A1)-FIND("#",SUBSTITUTE(A1,"
","#",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))) in D1
Thanks to all of you who answered especially the additional questions about
how the code worked.
I realised too late that although the code was splitting the string
beautifully (and so fast) that if the string had just firstname and surname
then the surname was being placed in column C and C was then a mixture of
Surname and Middle name.
If anyone could help me any further with this I would be over the moon
Thank you