How do I extract text to the right of a comma in Excel?

The process of extracting text to the right of a comma in Excel involves using the “RIGHT” function to locate the comma in a given cell and then extracting the text to the right of it. This can be useful for separating data that is separated by commas, such as names and addresses, into separate columns. By using this function, users can efficiently manipulate and organize their data in a spreadsheet format. This feature is particularly beneficial for individuals and businesses that handle large amounts of data in Excel and need to quickly extract specific information.

Excel: Extract Text Right of Comma


You can use the following formula to extract all of the text to the right of a comma in some cell in Excel:

=TEXTAFTER(A2, ",")

This particular formula extracts all of the text in cell A2 that occurs after the first comma is encountered.

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

Example: Extract Text Right of Comma in Excel

Suppose we have the following list in Excel that provides a description of different basketball players including their team, position, and rating:

Now suppose that we would like to extract only the text in each cell to the right of the first comma.

To do so, we can type the following formula into cell B2:

=TEXTAFTER(A2, ",")

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

Excel right of comma

Column B now displays only the text to the right of the first comma of each cell in column A.

If you would instead like to display all text to the right of the last comma of each cell in column A, you could type the following formula into cell B2 instead:

=TEXTAFTER(A2, ",", -1)

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

Note that the third argument in the TEXTAFTER function specifies the instance of the delimiter to extract the text after.

By using -1 we specify that all text should be extracted to the right of the last instance of a comma.

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

Additional Resources

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

x