second word in a string

W

Wanna Learn

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
 
J

Jacob Skaria

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
 
D

Dave Peterson

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.
 
J

Jacob Skaria

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top