Skip to main content

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

Cell: the cell from which you want to extract all text strings between two words;
Start_word: the start word of the two words you want to extract all text strings after it;
Length1: the length of the start word.
End_word: the end word of the two words you want to extract all text strings before it.
Length2: the length of the start word plus 1.

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.

2.1) Check the Filter box and then enter the word “Extract” into the text box;
2.2) In the Choose a formula list box, click the Extract strings between specified text option;
2.3) In the Arguments input section:
In the Cell box, select a cell where you want to extract the text (here I select cell B5);
In the Start char(s) box, enter the start word of the two words you want to extract all text strings after it;
In the End char(s) box, enter the end word of the two words you want to extract all text strings before it.
2.4) Click Ok. See screenshot:

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

Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

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...

kte tab 201905


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!
Comments (2)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hello, there is an issue with the first formula which only worked for me if I use lenght1 = length2 despite the searched word lengths had been different. Can you check that and correct please?
This comment was minimized by the moderator on the site
Excellent post! Saved my live :)
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations