Extracting text from strings in a cell

B

Beverly

=LEFT(TRIM(A1),(FIND(" ",TRIM(A1)&" ",FIND(" ",TRIM(A1)&" ")+1)-1))
Finds the first two words in a string. How can I find the first three words?

Thanks much!

--Beverly
 
J

JE McGimpsey

One way (assuming words are any text strings separated by spaces):

=TRIM(LEFT(A1,FIND("^",SUBSTITUTE(TRIM(A1)&" "," ","^",3))-1))

this will return the first three words, or all the words if <3.
 

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