Get or extract the first word from text string in Excel
To extract all the first words from a list of text strings which are separated by spaces, the LEFT and FIND function in Excel can do you a favor.
To deal with this job, you should combine the LEFT and FIND functions together, the generic syntax is:
- text: The text string or cell value that you want to use.
1. Please enter or copy the below formula into a blank cell:
2. Then, copy this formula to other cells that you want to use this formula, and all first words in the text strings have been extracted, see screenshot:
Explanation of the formula:
FIND(" ",A2)-1: The FIND function is used to get the position of first occurrence of the space character, and subtract 1 to return the position of the last character of the first word.
LEFT(A2,FIND(" ",A2)-1): The LEFT function extracts the left-most characters based on the number of characters that returned by the FIND function.
Note: If there is only one word in the cell, this formula will return the #VALUE! error value as following screenshot shown:
To fix this problem, you should embed the IFERROR function into the formula as this:
Relative functions used:
- The FIND function is used to find a string within another string, and returns the starting position of the string inside another one.
- The LEFT function extracts the given number of characters from the left side of a supplied string.
- Extract Nth Word From Text String In Excel
- If you have a list of text strings or sentences, now, you want to extract the specific nth word from the list as below screenshot shown. This article, I will introduce some methods for solving this job in Excel.
- Get Or Extract The Last Word From Text String In Excel
- To extract the last word from text string which are separated by the space characters, normally, you can create a formula based on the TRIM, SUBSTITUTE, RIGHT and REPT functions in Excel.
- Extract Last Line Of Text From A Multi-Line Cell
- To extract the last line of text from a text string which is separated by line breaks, normally, there is no direct way for you to solve this. This article, I will introduce a formula to deal with this task in Excel.