# How to extract text between parentheses in Google Sheets

Capture what's inside the brackets: `=REGEXEXTRACT(A2,"\(([^)]*)\)")`.

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

**Excel:** In Excel 2024 or Microsoft 365, nest TEXTAFTER and TEXTBEFORE: `=TEXTBEFORE(TEXTAFTER(A2,"("),")")`.

## Example

Sample data (row 1 is the header):

| A | B |
| --- | --- |
| Employee | Department |
| Ana Ruiz (Finance) |  |
| Raj Patel (Sales) |  |
| Lee Chen (IT) |  |
| Kim Ortiz (Customer Success) |  |
| Mo Diaz (Marketing) |  |

Formula in B2, filled to B6: `=REGEXEXTRACT(A2,"\(([^)]*)\)")`

Result: Finance; Sales; IT; Customer Success; Marketing

## How it works

Brackets have a special meaning in patterns, so the literal ones are escaped: `\(` and `\)`. Between them, `([^)]*)` captures any run of characters that aren't a closing bracket, and REGEXEXTRACT returns just that group.

## Other ways

- `=TEXTBEFORE(TEXTAFTER(A2,"("),")")`: The Excel version.
- `=TRIM(REGEXEXTRACT(A2,"^[^(]+"))`: The opposite: the name before the bracket, with the trailing space trimmed. (The names: Ana Ruiz, Raj Patel and so on.)

## Common mistakes

- Unescaped brackets, `"((.*))"`, are read as groups and return the whole text.
- With two bracketed parts, this returns the first. Use REGEXEXTRACT with two groups, or SPLIT, to get both.

## Questions

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

Escape those instead: `=REGEXEXTRACT(A2,"\[([^\]]*)\]")`.

**How do I remove the bracketed part?**

Replace it with nothing: `=TRIM(REGEXREPLACE(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-in-google-sheets
