## How to extract text before / after the second space or comma in Excel?

In Excel, the Text To Columns function may help you to extract each text from one cell into separate cells by space, comma or other delimiters, but, have you ever tried to extract the text before or after the second space or comma from a cell in Excel as following screenshot shown? This article, I will talk about some methods to deal with this task.

**Extract text before the second space or comma with formula**

**Extract text after the second space or comma with formula**

#### ** Extract text before the second space or comma with formula**

To get the text before the second space, please apply the following formula:

Enter this formula: **=IF(ISERROR(FIND(" ",A2,FIND(" ",A2,1)+1)),A2,LEFT(A2,FIND(" ",A2,FIND(" ",A2,1)+1)))** into a blank cell where you want to locate the result, **C2**, for example, and then drag the fill handle down to the cells that you want to contain this formula, and all the text before the second space has been extracted from each cell, see screenshot:

**Note**: If you want to extract the text before the second comma or other separators, please just replace the space in the formula with comma or other delimiters as you need. Such as: **=IF(ISERROR(FIND(",",A2,FIND(",",A2,1)+1)),A2,LEFT(A2,FIND(",",A2,FIND(",",A2,1)+1)))**.

#### ** Extract text after the second space or comma with formula**

To return the text after the second space, the following formula can help you.

Please enter this formula: **=MID(A2, FIND(" ", A2, FIND(" ", A2)+1)+1,256)** into a blank cell to locate the result, and then drag the fill handle down to the cells to fill this formula, and all the text after the second space has been extracted at once, see screenshot:

**Note:** If you want to extract the text after the second comma or other separators, you just need to replace the space with comma or other delimiters in the formula as you need. Such as: **=MID(A2, FIND(",", A2, FIND(",", A2)+1)+1,256)**.

### Best Office Productivity Tools

**Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. ** **Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...**

#### Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!