+ Reply to Thread
Results 1 to 6 of 6

Need help with MID formula to get the results within the parenthesis

  1. #1
    Forum Contributor
    Join Date
    05-22-2012
    Location
    Boise, Idaho
    MS-Off Ver
    Office 365
    Posts
    156

    Need help with MID formula to get the results within the parenthesis

    I have several hundred lines of data month over month where I am looking to quantify the number of lines for each company. Some companies have different divisions so I just need to extract the given company ID # within the parenthesis. Then I will do an index match separately to put the company ID# with the parent company name.

    For some reason when I use the below formula I get an error " you have too few arguments for this function"

    =MID(B3, SEARCH(“(“, B3)+1, SEARCH(“)”,B1) – SEARCH(“(“,B1)-1)

    But when I use this formula I get too much info

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

    Can someone help settle on the formula where I just want to get the results within the parenthesis. Below is an example of a line of data

    American Transfer Partners (0112015) - ATP-ENERGY TRANSFER ACTIVE (A19)

    Thanks

  2. #2
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: Need help with MID formula to get the results within the parenthesis

    Your first formula looks at B3, and B1
    Your 2nd formula looks at a single cell. B2

    You might adjust the ranges as needed.

  3. #3
    Forum Contributor
    Join Date
    05-22-2012
    Location
    Boise, Idaho
    MS-Off Ver
    Office 365
    Posts
    156

    Re: Need help with MID formula to get the results within the parenthesis

    Attachment added
    Attached Files Attached Files
    Last edited by mrteater; 05-06-2020 at 11:59 AM.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Need help with MID formula to get the results within the parenthesis

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Need help with MID formula to get the results within the parenthesis

    Maybe try

    =MID(B2,FIND("(",B2)+1,7)

    =MID(B2,FIND("(",B2)+1,7)&" "&LEFT(RIGHT(B2,4),3)

  6. #6
    Forum Contributor
    Join Date
    05-22-2012
    Location
    Boise, Idaho
    MS-Off Ver
    Office 365
    Posts
    156

    Re: Need help with MID formula to get the results within the parenthesis

    This works-- thank you for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 04-10-2016, 11:42 AM
  2. [SOLVED] Extract Number from Parenthesis for Use in Formula
    By kellyjo7 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-09-2015, 06:48 PM
  3. [SOLVED] Missing parenthesis or too many argument on a formula
    By dache416 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-27-2014, 01:15 PM
  4. [SOLVED] IF statement missing parenthesis in formula
    By Abyrose in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-15-2014, 06:24 PM
  5. [SOLVED] Formula missing parenthesis
    By katieshields in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-06-2014, 03:44 AM
  6. Series in parenthesis of formula
    By andersb in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-12-2011, 04:41 AM
  7. [SOLVED] Formula Split or parenthesis problem?
    By nastech in forum Excel General
    Replies: 0
    Last Post: 01-15-2006, 09:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1