# How to extract text between parentheses in Excel

Take what follows "(" and stops at ")": =IFERROR(TEXTBEFORE(TEXTAFTER(A2,"("),")"),""). IFERROR leaves rows without brackets blank.

**Excel:** `=IFERROR(TEXTBEFORE(TEXTAFTER(A2,"("),")"),"")` (Microsoft 365 only)

**Google Sheets:** `=IFERROR(REGEXEXTRACT(A2,"\(([^)]*)\)"),"")`

## Example

Sample data (row 1 is the header):

| A | B |
| --- | --- |
| Product | Color |
| Desk lamp (Black) |  |
| Office chair (Charcoal grey) |  |
| Monitor arm (Silver) |  |
| Standing desk (Walnut) - 140 cm |  |
| USB-C dock |  |
| Notebook (A5) (Dotted) |  |

Formula in B2, filled to B7: `=IFERROR(TEXTBEFORE(TEXTAFTER(A2,"("),")"),"")`

Result: Black; Charcoal grey; Silver; Walnut; ; A5

## How it works

TEXTAFTER returns everything after the first "(" and TEXTBEFORE keeps everything before the next ")". Text after the closing bracket, like "- 140 cm", is dropped. "USB-C dock" has no brackets, so the formula errors and IFERROR shows a blank.

In Google Sheets, `\(([^)]*)\)` matches a bracket, then captures the characters that aren't a closing bracket.

## Other ways

- `=IFERROR(MID(A2,FIND("(",A2)+1,FIND(")",A2)-FIND("(",A2)-1),"")`: Works in every version: start after the "(" and take as many characters as lie between the two brackets.

## Common mistakes

- Only the first pair is returned: "Notebook (A5) (Dotted)" gives "A5". For the second pair use `TEXTAFTER(A2,"(",2)`.
- Nested brackets, like "Kit (incl. (2) cables)", stop at the first ")". Use instance -1 on the closing bracket if the outer pair is what you want.

## Questions

**How do I extract text between square brackets?**

Swap the characters: `=TEXTBEFORE(TEXTAFTER(A2,"["),"]")`.

**How do I remove the text in parentheses instead?**

Use `=TRIM(TEXTBEFORE(A2,"(",,,,A2)&TEXTAFTER(A2,")",,,,""))`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/extract-text-between-parentheses
