Excel Extract Nth Word from a Text String


In Microsoft Excel, how would you extract the Nth word in a string? If you are using Excel 365, you could use the function TEXTSPLIT. Otherwise, you can use a more manual approach and use some other functions.

Splits text strings by using column and row delimiters. The TEXTSPLIT function works the same as the Text-to-Columns wizard but in formula form. It allows you to split across columns or down by rows. It is the inverse of the TEXTJOIN function. Below is a screenshot of Excel.

INDEX() function

In order to get the Nth word, and not all of the words, we will use the INDEX() function along with the TEXTSPLIT() function. The INDEX() function allows you to return the entry in any row and column within an array. For example, the function INDEX(A1:D2, 2, 3) returns the second row and third column of the array A1:D2. The formula will return the value of cell C2.

Here is an example of the INDEX() function. Index() is a lookup and reference function. The general formula is INDEX(array, row_number, column_number).

The Nth Word

Here is our final formula and result. Cell A5 shows the formula in cell C5. Cell A6 shows C6 and so on. To show the formula I’ve used the Excel function FORMULATEXT(). Cell A5 contains =FORMULATEXT(C5).

Here is a webpage at ExcelJet that explains this same topic.

Leave a comment

Your email address will not be published. Required fields are marked *