1
votes

Given a sentence, for example:

The quick brown fox jumped over the lazy dog

what Excel formula would extract the first four words?:

The quick brown fox

1
Have you tried a simple search? I've got about 531,000 results in 0.36 seconds. Your starting point is: LEFT().carlodurso
Yes I have tried that, they usually talk about getting the first or last or nth word but nothing about extracting a specific number of words, in my case the first 4 words.Yup Me
Please post the code that you have tried so far. We'll take it from there.carlodurso

1 Answers

2
votes

Please try:

=LEFT(SUBSTITUTE(A1," ","|",4),FIND("|",(SUBSTITUTE(A1," ","|",4)))-1)