![]() |
#3
|
|||
|
|||
![]()
Having a full name in single column may be really a can of worms!
![]() When you are sure both first and last names are always single names, you can use worksheet formulas - no need for VBA: a) for leftmost name =LEFT($A2,IF(ISERROR(FIND(" ",$A2;1)),LEN($A2),FIND(" ",$A2,1))) b) for rightmost name =IF(ISERROR(FIND(" ",$A2,1)),"",MID($A2,FIND("|",IF(ISERROR(FIND( " ",$A2,1)),"",SUBSTITUTE($A2," ","|",FIND(" ",$A2,1)-1)))+1,250)) When there is only a single name in FullName column ($A), the 2nd formula returns an empty string. Instead of character "|" you can use any other character not being used in any of names. Of course the formulas aren't helping when people have many-part first names (NB! Not first and middle names, but several first names!) or many-part last names (p.e. some women add husbands family name to her maiden family name) - but then doesn't VBA help too. And I hate to think about Spanish names at all ![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro for creating word docs from existing template | ferocious12 | Word VBA | 5 | 02-04-2017 09:57 PM |
![]() |
Hewg74 | Word VBA | 3 | 08-22-2016 05:20 PM |
![]() |
drhauser | Mail Merge | 2 | 12-14-2011 02:18 PM |
How do you update existing Outlook calendar item from Word with macro? | Joe Patrick | Word VBA | 0 | 07-09-2011 05:32 AM |
Any easy way to separate a Word document into separate files? | SamHelm | Word | 0 | 08-21-2010 05:29 AM |