LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing numeric X-axis labels with corresponding text string Cinco Excel Discussion (Misc queries) 2 July 25th 09 11:13 PM
Extracting text from a string [email protected] Excel Worksheet Functions 8 June 2nd 08 10:09 PM
Extracting text from string Confused Excel Worksheet Functions 4 February 15th 08 03:34 PM
Extracting a word from a text string Nadeem Excel Discussion (Misc queries) 3 October 12th 06 09:17 AM
Extracting from a text string AmyTaylor Excel Worksheet Functions 3 June 24th 05 01:34 PM


All times are GMT +1. The time now is 08:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"