I'm using the following formula to extract the first five words from a string in cell A1.
=TRIM(LEFT(A1,FIND("^",SUBSTITUTE(TRIM(A1)&" "," ","^",5))-1))
It works great except when the string has fewer than 5 words in it, in which case it returns a "Value#" error.
Any suggestions on how to edit this so it can handle strings that are only 1, 2, 3, or 4 words long?
Bookmarks