Got first word of text string, can I get 2?

C

crckrjck

Found a function to get the first word of a string, can this be made to get 2
or 3 words?

=LEFT(A1,FIND(" ",A1))
 
R

ruffnro

Great question. The next part of the find formula (that you don't always
need to use) is the starting point. Therefore, to get the first two words,
use this formlula:

=LEFT(A1,FIND(" ",A1,FIND(" ",A1)+1))

This puts the starting point after the first word.

Enjoy!
 
R

Randall Parker

Depending on the number of words, you might have a shot. If you have two or
three words only, try the following commands:

=LEFT(A1,FIND(" ",A1)) Finds first word
=MID(A1,FIND(" ",A1),FIND(" ",A2) Finds middle word (or 2nd of 3)

The downside is that you pick-up spaces, but I hope I moved you closer to
your goal.
 

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