How can I extract the last 3 words from a cell in Excel? 2

How can I extract the last 3 words from a cell in Excel?

To extract the last 3 words from a cell in Excel, you can use the RIGHT function. This function allows you to specify the number of characters you want to extract from the right side of the cell. By using the LEN function, which calculates the number of characters in a cell, you can determine the starting point for the RIGHT function. For example, if the cell contains the sentence “I love to cook,” the LEN function would return a value of 14. By using the RIGHT function with a starting point of 11 (14 – 3), you can extract the last 3 words “to cook” from the cell. This method can be useful for manipulating and organizing data in Excel spreadsheets.

Extract Last 3 Words from Cell in Excel


You can use the following formula in Excel to extract the last 3 words from a cell:

=TEXTAFTER(A2, " ", -3)

This particular formula extracts the last 3 words from cell A2.

The following example shows how to use this formula in practice.

Example: Extract Last 3 Words from Cell in Excel

Suppose we have the following column of phrases in Excel:

Suppose we would like to extract the last 3 words from each cell in column A.

We can type the following formula into cell B2 to do so:

=TEXTAFTER(A2, " ", -3)

We can then click and drag this formula down to each remaining cell in column B:

Excel extract last 3 words

Column B now contains the last 3 words from each cell in column A.

Note: You can replace the value 3 in the formula with any value you’d like to instead extract the last n words.

How This Formula Works

Recall the formula that we used to extract the last 3 words from each cell:

=TEXTAFTER(A2, " ", -3)

TEXTAFTER(text, delimiter, [instance_num], …)

where:

  • text: Text to search
  • delimiter: Character or substring to extract text after
  • instance_num (optional): Instance of delimiter after which to extract text (default is 1)

The first argument specifies that we want to search cell A2.

The second argument specifies that we want to extract text after a space.

The third argument specifies that we would like to extract the text after the third to last space.

By supplying a negative value to this argument, we’re able to search the string starting from the right side.

By using this formula, we are able to extract the last 3 words from a given cell.

Note: You can find the complete documentation for the TEXTAFTER function in Excel .

The following tutorials explain how to perform other common tasks in Excel:

Cite this article

stats writer (2024). How can I extract the last 3 words from a cell in Excel?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-extract-the-last-3-words-from-a-cell-in-excel/

stats writer. "How can I extract the last 3 words from a cell in Excel?." PSYCHOLOGICAL SCALES, 22 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-extract-the-last-3-words-from-a-cell-in-excel/.

stats writer. "How can I extract the last 3 words from a cell in Excel?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-extract-the-last-3-words-from-a-cell-in-excel/.

stats writer (2024) 'How can I extract the last 3 words from a cell in Excel?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-extract-the-last-3-words-from-a-cell-in-excel/.

[1] stats writer, "How can I extract the last 3 words from a cell in Excel?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.

stats writer. How can I extract the last 3 words from a cell in Excel?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top