Excel formula to parse out Nth words in cell
top of page

Excel formula to parse out Nth words in cell


You can use this formula to extract the nth word or string in a cell. In this format, the number of the string to be extracted is referenced in cell $B1

=TRIM(MID(SUBSTITUTE($A2," ",REPT(" ",LEN($A2))), (B$1-1)*LEN($A2)+1, LEN($A2)))

Cell $A2 references the cell with multiple strings that is to be reviewed. The formula uses the LEN formula to calculate the position of the string, and the MID formula to extract the string.

Putting this formula in cell B2 and pulling it to the right (CTRL + R), will extract out the nth word in cell A2 which matches the number listed in the first row. So you can designate the number position of the strings you want to extract in successive cells, and pull out the needed data without revising the formula. This works well to separate the words in a person's name into different cells.


bottom of page