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