Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • How to get last row in numeric data in Excel
  • CHOOSE function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel VLOOKUP Function
  • Convert text string to valid reference in Excel using Indirect function
  • How to use Excel OFFSET function

Data Analysis Examples

  • Conflicting Multiple Conditional Formatting Rules in Excel
  • Randomize/ Shuffle List in Excel
  • Subtotal function in Excel
  • How to sum a total in multiple Excel tables
  • How to Create One and Two Variable Data Tables in Excel

Data Validation Examples

  • Excel Data validation no punctuation
  • Excel Data validation date in next 30 days
  • Excel Data validation require unique number
  • Excel Data validation allow uppercase only
  • Excel Data validation exists in list

How to extract text between parentheses in Excel

by

To extract text between parentheses, braces, brackets, etc. you can use a formula based on the MID function, with help from SEARCH function.

Formula

=MID(text,SEARCH("(",text)+1,SEARCH(")",
text)-SEARCH("(",text)-1)

Explanation

In the example shown, the formula in C5 is:

=MID(B5,SEARCH("(",B5)+1,SEARCH
(")",B5)-SEARCH("(",B5)-1)+0

How this formula works

The foundation of this formula is the MID function, which extracts a specific number of characters from text, starting at a specific location. To figure out where to start extracting text, we use this expression:

SEARCH("(",B5)+1

This locates the left parentheses and adds 1 to get the position of the first character inside the parentheses. To figure out how many characters to extract, we use this expression:

SEARCH(")",B5)-SEARCH("(",B5)-1

This locates the second parentheses in the text, and subtracts the position of the first parentheses (less one) to get the total number of characters that need to be extracted. With this information, MID extracts just the text inside the parentheses.

Worked Example:   How to convert text string to array in Excel

Finally, because we want a number as the final result in this particular example, we add zero to text value returned by MID:

+0

This math operation causes Excel to coerce text values to numbers. If you don’t need or want a number at the end, this step is not required.

Worked Example:   Convert text to numbers using VALUE function in Excel
Worked Example:   Convert text date dd/mm/yy to mm/dd/yy in Excel

Post navigation

Previous Post:

How to get first word in Excel

Next Post:

Join cells with comma in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others
  • Extract middle name from full name — Manipulating NAMES in Excel
  • Remove last characters from right in a cell in Excel
  • TRIM function: Description, Usage, Syntax, Examples and Explanation
  • How to strip non-numeric characters in Excel
  • How to extract domain from email address in Excel
  • Display Date is same month in Excel
  • Convert text to date in Excel
  • Add decimal hours to time in Excel
  • Calculate date overlap in days in Excel
  • How to calculate quarter from date in Excel
  • IPMT function: Description, Usage, Syntax, Examples and Explanation
  • How to calculate Net Present Value (NPV) in Excel
  • RATE function: Description, Usage, Syntax, Examples and Explanation
  • Calculate payment periods for loan in Excel
  • DURATION function: Description, Usage, Syntax, Examples and Explanation
Acronyms, Abbreviations, Initialism & What They Stand For
© 2021 xlsoffice. All Rights Reserved | Teal Smiles