Pull out the text sitting between two markers, like inside parentheses.
Copy this formula
=TEXTAFTER(TEXTBEFORE(A2, ")"), "(")TEXTBEFORE trims everything after the closing marker and TEXTAFTER drops everything up to the opening marker, leaving just the middle. In older Excel, use MID with two FINDs.
=TEXTAFTER(TEXTBEFORE("Item (SKU-42)", ")"), "(")→SKU-42Grabs the text inside the parentheses.
Returns the part of an email address between the @ and the dot.
=MID("[A-17] Bolt", 2, FIND("]", "[A-17] Bolt")-2)→A-17Works in every Excel version when the text starts with the opening bracket.
Legacy (MID + FIND)
=MID(A2, FIND("(",A2)+1, FIND(")",A2)-FIND("(",A2)-1)Works before TEXTBEFORE/TEXTAFTER existed.
TEXTBEFORE/TEXTAFTER take an instance number; pass it to target the 2nd or 3rd marker.
TEXTBEFORE and TEXTAFTER return #N/A. Wrap the formula in IFERROR: =IFERROR(TEXTAFTER(TEXTBEFORE(A2, ")"), "("), "").
Nest the two functions the other way round: =TEXTBEFORE(TEXTAFTER(A2, "-"), "-") returns the text between the first and second hyphen.
Excel for Microsoft 365, Excel 2024 and Excel for the web. In Excel 2021 and earlier use the MID and FIND version.
Need a formula for your own data?
Describe what you want in plain language and let ExcelGPT write, explain, and verify the formula — free to start, no plugin.