Results 1 to 5 of 5

extract text form text string( extract 5 charactors in front of all left parenthese)

Threaded View

  1. #1
    Registered User
    Join Date
    07-28-2021
    Location
    usa
    MS-Off Ver
    2013
    Posts
    7

    Thumbs up extract text form text string( extract 5 charactors in front of all left parenthese)

    Dear All,

    I need to extract text form text string. there are multiple parentheses in the text string.
    There are multiple parentheses in the text string.
    My goal is to extract 5 charactors in front of all left parenthese.



    First I tried

    =TRIM(MID(SUBSTITUTE(SUBSTITUTE("("&$A2,"(",")"),")",REPT(" ",LEN($A2))),2*LEN($A2)*(COLUMNS($A:A)),LEN($A2)))

    which works well to extract all the context inside the parentheses.

    Then I tried

    =MID(A2,SEARCH("(",A2)-5,SEARCH(")",A2)-SEARCH("(",A2)+7)

    which works well to extract the 5 charactors in front of "(" but it only works for the first "(", not all of them in the test string.

    I don't know how to combine these two to achieve my goal.

    Please kindly help me out here..

    With My Best Regards,

    PS. If anyone could explain the first formula for me that would be great.
    I am thinking if I could just edit a little based on the first formula to achieve my goal here?

    Any help would be greatly appreciated.

    Many thanks,
    Last edited by happyexcel2021; 07-29-2021 at 12:07 PM. Reason: add more information

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 06-26-2017, 09:04 PM
  2. Extract text between two characters in a string - varing text length
    By luv2birdie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-04-2014, 06:10 PM
  3. [SOLVED] Extract text from a given point in a text string, when data points do not share the given
    By reedersketer in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-09-2014, 03:57 PM
  4. [SOLVED] Extract text from a string of text (amend formula to include new criteria)
    By robertguy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-10-2013, 04:53 PM
  5. Extract out charactors from a string
    By davidwgregg in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-06-2013, 06:08 AM
  6. Extract phone number front block of text
    By Tech in forum Excel General
    Replies: 6
    Last Post: 08-08-2005, 12:05 PM
  7. [SOLVED] EXTRACT TEXT FROM TEXT STRING:The names are of variable length
    By carricka in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-08-2005, 06:05 AM

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