Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 318
Default second word in a string

Hello How Do I extract anything after the first word example column AU
reads Massapequa 5 Prime so in this instance I want to extract 5 prime
this is my messed up formula =TRIM(MID(AU4,SEARCH(" ",AU4)+3,255)) I get
PRIME . Thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default second word in a string

One way.

=MID(A1,FIND(CHAR(32),A1)+1,FIND(CHAR(32),A1,FIND( CHAR(32),A1)+1)-FIND(CHAR(32),A1)-1)

If this post helps click Yes
---------------
Jacob Skaria


"Wanna Learn" wrote:

Hello How Do I extract anything after the first word example column AU
reads Massapequa 5 Prime so in this instance I want to extract 5 prime
this is my messed up formula =TRIM(MID(AU4,SEARCH(" ",AU4)+3,255)) I get
PRIME . Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default second word in a string

How about:

=trim(MID(TRIM(Au4),SEARCH(" ",TRIM(Au4),1)+1,255))

The extra trims around AU4 makes sure that there aren't
leading/trailing/multiple consecutive internal spaces in what's being searched.





Wanna Learn wrote:

Hello How Do I extract anything after the first word example column AU
reads Massapequa 5 Prime so in this instance I want to extract 5 prime
this is my messed up formula =TRIM(MID(AU4,SEARCH(" ",AU4)+3,255)) I get
PRIME . Thanks


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default second word in a string

To retrieve from 2nd word onwards you can use

=MID(A1,FIND(CHAR(32),A1)+1,LEN(A1))

The subject line of your post was to extract 2nd word and hence my original
response

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

One way.

=MID(A1,FIND(CHAR(32),A1)+1,FIND(CHAR(32),A1,FIND( CHAR(32),A1)+1)-FIND(CHAR(32),A1)-1)

If this post helps click Yes
---------------
Jacob Skaria


"Wanna Learn" wrote:

Hello How Do I extract anything after the first word example column AU
reads Massapequa 5 Prime so in this instance I want to extract 5 prime
this is my messed up formula =TRIM(MID(AU4,SEARCH(" ",AU4)+3,255)) I get
PRIME . Thanks

Reply
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
return 1st word in string EngelseBoer Excel Discussion (Misc queries) 6 September 7th 08 11:25 AM
Extracting a word from a text string Nadeem Excel Discussion (Misc queries) 3 October 12th 06 09:17 AM
Find last word in a string clearwaterdave Excel Discussion (Misc queries) 8 July 28th 06 07:01 PM
choose a particular word in a string Tim Excel Discussion (Misc queries) 4 May 24th 06 07:15 AM
Word select from a string bridgjr Excel Worksheet Functions 3 August 4th 05 12:08 PM


All times are GMT +1. The time now is 12:07 PM.

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

About Us

"It's about Microsoft Excel"