+ Reply to Thread
Results 1 to 7 of 7

Extract all occurence between parenthesis

  1. #1
    Registered User
    Join Date
    04-30-2014
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Extract all occurence between parenthesis

    hello,

    i'm new to VBA, i was looking all the day for a macro or formula to extract all the occurence between parenthesis in another Column

    exemple

    A1) bla bla (vv/vvv), blabla (ooo/oo), blabla (xx/dddddd)

    become

    B1 (vv/vvv) (ooo/oo) (xx/dddddd)

    i need all occurence whatever how many they are..
    Thank you in advance

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,102

    Re: Extract all occurence between parenthesis

    Maybe:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    04-30-2014
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Extract all occurence between parenthesis

    thank's for reply

    this is near but the result is still not fine:

    i tried on

    A1 : (A11ss-Early 2006-MA205LL/A)

    output

    B1 : (A11ss-Early

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,102

    Re: Extract all occurence between parenthesis

    Well, that example does look a lot different to the previous example.

    I suspect a different approach will be required.

    Maybe tomorrow. Unless anyone else wants to pick it up?

  5. #5
    Forum Contributor
    Join Date
    05-04-2014
    Location
    New Jersey, United States
    MS-Off Ver
    Excel 2010, 2013
    Posts
    120

    Re: Extract all occurence between parenthesis

    Try out this UDF called ParenthesesText:

    Please Login or Register  to view this content.
    Paste the code into a new module then use it like you would any other function by typing =ParenthesesText(ref) where "ref" is the reference to the cell containing your text.

    For example, assume cell A1 contains the following text:
    This (is) a (test).

    To use the function, type =ParenthesesText(A1) into any cell.
    The result should (is) (test)

    Assumptions
    There are no nested parentheses
    There are no non-paired parentheses. In other words, there must be an equal number of open and closed parentheses
    Last edited by clabulis; 10-02-2014 at 10:47 PM.

  6. #6
    Registered User
    Join Date
    04-30-2014
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Extract all occurence between parenthesis

    Awesome!! it's working perfectly

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,102

    Re: Extract all occurence between parenthesis

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. Parenthesis Help with SQL in VBA
    By jo15765 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-01-2012, 03:32 AM
  2. Replies: 2
    Last Post: 03-21-2012, 12:28 PM
  3. Missing parenthesis
    By docrobo in forum Excel General
    Replies: 3
    Last Post: 10-23-2011, 05:18 PM
  4. Parenthesis
    By John Abbot in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-10-2007, 09:49 AM
  5. [SOLVED] Parenthesis
    By GitFinger in forum Excel General
    Replies: 2
    Last Post: 03-31-2006, 10:30 AM

Tags for this Thread

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