View Single Post
  #7   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

It helps to have a set of nice data but of course that isn't always what
happens. If you know, for instance, that the surname will always be between
the first space and the first comma, you could do this

=MID(A1,SEARCH(" ",A1)+1,SEARCH(",",A1)-SEARCH(" ",A1)-1)

You have to play it by ear a little - you can use the IF function to
seperate different options depending on, say, whether there is a comma in it
or not.

Jeff

"Fam via OfficeKB.com" <u18245@uwe wrote in message
news:61143504495eb@uwe...
I able to extract the first name name but what if the situation is like
John Smith, CFO
Now I canextract the first name by
=left(A1, find(" ",A1)-1)
and the title by
=trim(mid(a1,find(" ",A1),255)) but come is still coming with it and I can
not able to resolve how to seperate the last name with the title and
extract
it out
any help please?

Fam wrote:
thanks Jeff

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

[quoted text clipped - 16 lines]
Any help will be appreciated
thx


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200605/1