Text

Extract text between two characters in Excel

Find where the opening character is, where the closing one is, and take what's in between with MID.

MID/FIND: all versions and Google Sheets

The formula

Excel & Google SheetsExcelGoogle Sheets
=MID(A2,FIND("(",A2)+1,FIND(")",A2)-FIND("(",A2)-1)
In C2 → SKU-2231
Excel 365Excel 365
=TEXTBEFORE(TEXTAFTER(A2,"("),")")
In C3 → SKU-2231
Google Sheets (regex)Google Sheets
=REGEXEXTRACT(A2,"\((.*?)\)")
In C4 → SKU-2231
✓ Tested. All 1 Excel results in this example were recalculated in LibreOffice Calc 25.2 and matched the values shown. 2 results for formulas tagged Excel 365 / Google Sheets were checked with a reference implementation of the documented behavior, because LibreOffice can't run those functions.

Worked example

Paste the data below into a blank sheet starting at cell A1 (or download the cheat sheet, where every example is set up). Highlighted cells hold the formulas and show the expected results.

ABC
1Description
2Wireless mouse (SKU-2231) blackSKU-2231
3SKU-2231
4SKU-2231

How it works

FIND("(",A2)+1
Start right after the opening parenthesis.
FIND(")",A2)-FIND("(",A2)-1
Number of characters between the two.
"\((.*?)\)"
Regex: escaped parentheses around a lazy capture group; REGEXEXTRACT returns the group.

Common errors and fixes

Why does the formula return #VALUE!?

One of the characters is missing. Wrap in IFERROR(…,"").

Wrong text with repeated characters?

FIND gets the first one. For two dashes, find the second with FIND("-",A2,FIND("-",A2)+1).

Does this work in Google Sheets?

Yes. Use the formulas tagged "Google Sheets" on this page; formulas tagged only "Excel" use Excel-specific syntax.