FormulaCraft

How to extract text between two characters in Excel and Google Sheets

Topic:Text manipulation
Excel & Google Sheets
=MID(A2, FIND("[", A2) + 1, FIND("]", A2) - FIND("[", A2) - 1)

Verified example

Computed by a real spreadsheet engine on the sample data below.

Full TextExtracted Text
Example [text] here
Another [example] text
Data [needed] for analysis

=MID(A2, FIND("[", A2) + 1, FIND("]", A2) - FIND("[", A2) - 1)text

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Identify the cell containing the text from which you want to extract information.
  2. 2Determine the characters that bound the text you wish to extract.
  3. 3Use the MID, FIND functions to construct your formula.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

What if the delimiter characters are not present in the text?

The formula will return an error. You may need to add error handling using IFERROR.

Can this method be used for more complex text extraction?

Yes, but it might require combining multiple functions like LEFT, RIGHT, and SUBSTITUTE.

Does this work with special characters as delimiters?

Yes, it works with any character, including special ones, as long as they are correctly referenced in the formula.

More on Text manipulation

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: