← Back to Blog

Excel Extract Text Between Two Characters (MID + FIND Formula)

Extracting text that appears between two specific characters (like brackets, parentheses, or custom delimiters) is a common parsing task. Here's how to do it in Excel.

Extract Text Between Two Identical Characters

To extract text between two asterisks in "Order *ABC123* confirmed":

=MID(A2, FIND("*",A2)+1, FIND("*",A2,FIND("*",A2)+1)-FIND("*",A2)-1)

Extract Text Between Parentheses ( )

=MID(A2, FIND("(",A2)+1, FIND(")",A2)-FIND("(",A2)-1)

Example: "Product (XYZ-001) Available" → "XYZ-001"

Extract Text Between Square Brackets [ ]

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

Extract Text Between Two Different Characters

To extract text between "<" and ">" (HTML-style tags):

=MID(A2, FIND("<",A2)+1, FIND(">",A2)-FIND("<",A2)-1)

Handle Missing Delimiters with IFERROR

=IFERROR(MID(A2, FIND("(",A2)+1, FIND(")",A2)-FIND("(",A2)-1), "")

Returns blank if the delimiter isn't found, preventing ugly #VALUE! errors.

Excel 365: TEXTBEFORE and TEXTAFTER (Cleaner)

=TEXTBEFORE(TEXTAFTER(A2,"("),")")

Much more readable — TEXTAFTER extracts after "(", then TEXTBEFORE cuts before ")".

FAQ

How do I extract text between two characters in Excel?

Use =MID(A2, FIND(char1,A2)+1, FIND(char2,A2)-FIND(char1,A2)-1)

What if there are multiple occurrences of the delimiter?

FIND returns the first occurrence. Use FIND with a start position argument to find the second: FIND(char, A2, FIND(char,A2)+1)

Is there an easier way in Excel 365?

Yes: =TEXTBEFORE(TEXTAFTER(A2, open_char), close_char)

Related: Extract Last Name from Full Name and Extract Domain from Email.