Manually isolating cluttered data in Excel is a tedious struggle that drains valuable administrative hours. When organizing financial reports from standard funding sources, teams often rely on slow, error-prone copy-pasting. Transitioning to automated formulas grants you immediate data integrity and speed. However, as a key stipulation, your dataset must consistently feature both opening and closing characters for this to work. For example, extracting "USD" from "Budget (USD)" requires a precise combination of MID and SEARCH functions. Below, we will break down the exact syntax, provide step-by-step implementation instructions, and troubleshoot common nested formula errors.
Working with text strings is one of the most common tasks in Excel, especially when dealing with data imported from external databases, CRM platforms, or web scraping tools. Often, this data contains valuable pieces of information wrapped inside parentheses-such as area codes, transaction IDs, abbreviations, or product SKU details.
Manually extracting this information can be incredibly tedious, especially when managing datasets with thousands of rows. Fortunately, Excel offers several dynamic methods to extract text between parentheses automatically. Whether you are using the latest version of Excel 365 or a legacy version like Excel 2013, this comprehensive guide will walk you through the best formulas, functions, and alternative tools to get the job done quickly and accurately.
If you are using Microsoft 365 or Excel 2021, you have access to a suite of highly intuitive text manipulation functions. The most efficient way to extract text between parentheses is by nesting the TEXTBEFORE and TEXTAFTER functions.
=TEXTBEFORE(TEXTAFTER(A2, "("), ")")
This formula works from the inside out to isolate the desired text string:
TEXTAFTER(A2, "("): This part of the formula looks at cell A2 and discards everything before and including the open parenthesis (. It returns all text to the right of the opening parenthesis.TEXTBEFORE(..., ")"): The outer function then takes the output of the first step and discards everything starting from the closing parenthesis ) onwards, leaving only the text that was originally inside the parentheses.Suppose cell A2 contains the text: Product Code (SKU-9920) - In Stock.
TEXTAFTER(A2, "(") results in: SKU-9920) - In StockTEXTBEFORE(..., ")") yields: SKU-9920If your organization uses an older version of Excel (such as Excel 2019, 2016, or 2013), modern functions like TEXTAFTER are not available. In this case, you must combine traditional text functions: MID, SEARCH (or FIND), and math operators.
=MID(A2, SEARCH("(", A2) + 1, SEARCH(")", A2) - SEARCH("(", A2) - 1)
The MID function extracts a specific number of characters from the middle of a text string, starting at a position you define. Its syntax is: =MID(text, start_num, num_chars). Here is how we feed those arguments dynamically:
text: The cell containing your data (e.g., A2).start_num (The starting position): We use SEARCH("(", A2) + 1. This finds the character position of the opening parenthesis and adds 1, so the extraction begins with the very first character *inside* the parentheses.num_chars (The number of characters to extract): We calculate the length of the string inside the parentheses using the formula: SEARCH(")", A2) - SEARCH("(", A2) - 1. This subtracts the position of the open parenthesis from the closing parenthesis, then subtracts 1 to exclude the closing parenthesis itself.Let's use the string: Chicago (ORD) Airport in cell A2.
SEARCH("(", A2) returns 9 (the position of the "(").SEARCH(")", A2) returns 13 (the position of the ")").9 + 1 = 10 (the character "O").13 - 9 - 1 = 3.=MID(A2, 10, 3), returning ORD.If you apply the formulas above to a cell that does not contain parentheses, Excel will return a frustrating #VALUE! or #N/A error. To keep your spreadsheets clean and professional, you should wrap your extraction formulas in error-handling wrappers.
The IFERROR function intercepts errors and replaces them with a fallback value, such as a blank space ("").
For Excel 365 (Modern Formula):
=IFERROR(TEXTBEFORE(TEXTAFTER(A2, "("), ")"), "")
For Legacy Excel (MID/SEARCH Formula):
=IFERROR(MID(A2, SEARCH("(", A2) + 1, SEARCH(")", A2) - SEARCH("(", A2) - 1), "")
By using "" as the second argument of IFERROR, Excel will simply leave the cell blank if either the opening or closing parenthesis is missing.
Occasionally, you might encounter cells with multiple sets of parentheses, for example: John Smith (Sales) (Manager). Depending on your needs, you might want to extract only the first instance, the last instance, or all of them.
The TEXTAFTER and TEXTBEFORE functions have an optional argument called instance_num. To extract text from the second set of parentheses, you can specify that you want to target the second occurrence of the delimiters:
=TEXTBEFORE(TEXTAFTER(A2, "(", 2), ")")
This formula bypasses the first open parenthesis and begins looking for text after the second (.
If you only need to run this extraction as a one-off task and do not require dynamic updates, Excel provides two incredibly fast features that require absolutely no formulas: Flash Fill and Power Query.
Flash Fill is an AI-powered tool in Excel that recognizes patterns in your data entry and fills out the remaining rows automatically.
Ctrl + E on Windows).For large-scale data cleaning workflows, Power Query is the ultimate utility. It has a built-in extraction tool designed specifically for this task.
( as the Start delimiter and ) as the End delimiter.| Method | Excel Compatibility | Dynamic updates? | Best For... |
|---|---|---|---|
| TEXTBEFORE & TEXTAFTER | Office 365 / Excel 2021+ | Yes | Fast, readable, and highly accurate formulas. |
| MID & SEARCH | All Excel Versions | Yes | Compatibility across older machines and legacy spreadsheets. |
| Flash Fill | Excel 2013+ | No | One-off cleanups where formulas are unnecessary. |
| Power Query | Excel 2010+ (via Add-in) | With Refresh | Complex, recurring data preparation workflows. |
Extracting text between parentheses in Excel no longer has to be a headache. If you are using a modern version of Excel, leverage the simplified TEXTBEFORE(TEXTAFTER()) nested formula. If you are on an older version of Excel, rely on the time-tested MID and SEARCH combination, remembering to wrap it in IFERROR to keep your sheet clean. For manual data cleanups, Ctrl + E (Flash Fill) remains the fastest trick in the book!
Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.