How to extract text between two words in Excel?
For a list of text strings as shown in the screenshot below, to extract the text string between two words "KTE" and "feature" from each cell, are there any good ways to solve it? This tutorial introduces two methods to help you get it done.
Extract text between two words with formula in Excel
Extract text between two words with an amazing tool
Extract text between two words with formula
You can use a formula based on the MID function and the SEARCH function to extract all text strings between two words within a cell.
Generic formula
=MID(cell,SEARCH("start_word",cell)+length1,SEARCH("end_word",cell)-SEARCH("start_word",cell)-length2)
Arguments
Select a blank cell, copy or enter the formula below and press the Enter key to get the result. Select this result cell and then drag its AutoFill Handle down to apply this formula to other cells.
=MID(B5,SEARCH("KTE",B5)+3,SEARCH("feature",B5)-SEARCH("KTE",B5)-4)
Note: In the formula, the number 3 represents the character length of the word "KTE"; the number 4 represents the character length of the word "KTE" plus 1.
You can see all text strings between the specified two words are extracted from each cell in column B.
3.2.2 Extract text between two words with an amazing tool
For many Excel users, formulas may be hard to remember and handle. Here, with the Extract strings between specified text feature of Kutools for Excel, you can easily extract text between two words with just a few clicks.
1. Select a cell to output the result, and then click Kutools > Formula Helper > Formula Helper.
2. In the Formula Helper dialog box, you need to configure as follows.
3. Then all text strings between two words “KTE” and “feature” within the cell B5 is extracted. Meanwhile, a formula has been created, you can select this result cell and then drag its AutoFill Handle down to extract texts from other cells in the same list.
If you want to have a free trial (30-day) of this utility, please click to download it, and then go to apply the operation according above steps.
Relative Articles:
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!