Excel: Extract Characters from Right Until Space

Excel is a powerful and versatile tool that can be used to perform various tasks. One such task is extracting characters from the right until a space is encountered. This task can be especially useful when you need to extract a specific piece of information from a string of text. With the help of Excel’s functions and formulas, you can easily and quickly extract characters from the right until a space is encountered. This article will discuss how to use Excel to extract characters from the right until a space is encountered. It will also provide some useful examples that will help you better understand the topic.


You can use the following formula in Excel to extract all characters from the right side of a cell until a space is encountered:

=TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",255)),255))

This particular example extracts all of the characters on the right side of the string in cell A2 until a space is encountered.

For example, if cell A2 contains The Dallas Mavericks then this formula would return Mavericks since this represents all of the characters on the right side of the cell until a space is encountered.

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

Example: Extract Characters from Right Until Space in Excel

Suppose we have the following list of basketball team names in Excel:

We can type the following formula into cell B2 to extract all of the characters on the right side of the team name of cell A2 until a space is encountered:

=TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",255)),255))

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

Excel extract characters from right until space

Column B now displays all of the characters on the right side of each cell in column B until a space is encountered.

Notice that if multiple spaces are present in a cell, the formula is capable of identifying the last space and extracts only the characters to the right of it.

Note: The most recent versions of Excel now offer a TEXTAFTER function, which you can use to extract the text from a cell after a specific character.

You can use the following syntax to extract all characters to the right of the last space in a cell:

=TEXTAFTER(A2, " ", -1)

Column B now all of the characters on the right side of each cell in column B until a space is encountered.

Notice that this formula produces the same results as the previous formula.


x