Extracting text from strings in a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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