Can anyone help. I want extract the first name and surname from a text string containing their full name.
e.g. HAWES:GEORGE RICHARD becomes HAWES:GEORGE
Obviously they are all different lengths of name
Many thanks
Jack
Can anyone help. I want extract the first name and surname from a text string containing their full name.
e.g. HAWES:GEORGE RICHARD becomes HAWES:GEORGE
Obviously they are all different lengths of name
Many thanks
Jack
Maybe
VBA Noob=LEFT(A1,FIND(" ",A1))
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
Or may be
=TRIM(LEFT(A1,FIND(" ",A1)))
or
=LEFT(A1,FIND(" ",A1)-1)
oldchippy
-------------
![]()
![]()
Blessed are those who can give without remembering and take without forgetting
If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.
Click here >>> Top Excel links for beginners to Experts
Forum Rules >>>Please don't forget to read these
Or
Data - Text to columns - use space as delimiter
I usually prefer the menu: Data, Text to columns
Here are a few options, as building blocks:
Family name: =LEFT(A1,FIND(":",A1)-1) --> HAWES
First name: =LEFT(MID(A1,FIND(":",A1)+1,255),FIND(" ",MID(A1,FIND(":",A1)+1,255))-1) --> GEORGE
Second name: =MID(A1,FIND(" ",A1)+1,255) --> RICHARD
The formulas work for the sample, but will probably not work for all instances, since names are very inconsistant in their layout. I.e. Mr, Andersson-Smith, ...
//Ola
if you want to learn how to this also yourself in case you want to change the formulas later on I would suggest a good resource to check out here:
http://www.teachexcel.com/tutorials/...raction_p1.php
http://www.teachexcel.com/tutorials/...s/formulas.php
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks