View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jeff Standen[_2_] Jeff Standen[_2_] is offline
external usenet poster
 
Posts: 56
Default sperate from the space, in text, in the same cell

You could use the SEARCH worksheet function. This searches for a specific
character in a cell and returns the position. Combine it with LEFT or MID
(or RIGHT, if you also use LEN) to get the name you want.

=LEFT(A1,SEARCH(" ",A1)-1)

will give you the first name

=RIGHT(A1,LEN(A1)-SEARCH(" ",A1))

will give you the surname. You will have to be a little more creative if
there are middle names though.

Jeff

"Fam via OfficeKB.com" <u18245@uwe wrote in message
news:6113c58e9d8fc@uwe...
Hi..
Is there a way tpo seperate or extract out first or last name from the
same
cell?
for example, if in cell A1 we have John Smith, can I able top extract out
just John or Smith in cell B1?
Any help will be appreciated
thx

--
Message posted via http://www.officekb.com