View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] alanglloyd@aol.com is offline
external usenet poster
 
Posts: 38
Default Extracting and replacing the first word in a String of text

On Aug 21, 11:45�am, RAYCV wrote:
Hi, I am trying to extract and remerge data with an additional character
(comma). �For example, I have the following list in a column with many
variables

Jones Bob Mr
Campbell Jock Mr & Mrs
Smith Bob Banking Trust

and want it to be displayed as

Jones, Bob Mr
Campbell, Jock Mr & Mrs
Smith, Bob / Banking Trust

I have used =LEFT(G9,FIND(" ",G9)-1) to find the text and then
=H9&","&RIGHT(G9,FIND(" ",G9)*1) to concatenate the text, but it doesn't
return all the data for the 3rd record?? �What am I doing wrong


As you're just inserting a comma, why not find the space and use that
position to extract both the pre-comma & post-comma text.

=MID(G9,1,FIND(" ",G9)-1)&","&MID(G9,FIND(" ",G9),50)

Similar technique for the stroke insertion.

Alan Lloyd