+ Reply to Thread
Results 1 to 6 of 6

Extract text between specific string and closing parentheses

  1. #1
    Registered User
    Join Date
    10-22-2019
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    13

    Extract text between specific string and closing parentheses

    Please, can anyone help me out with a formula that will extract the text between the specific string "Format: " and the next instance of closing parentheses in my attached sample data?
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    Excel 2019 (Win 10 - Work) & 365 Subscription (Win 10 - Home)
    Posts
    32,526

    Re: Extract text between specific string and closing parentheses

    Try this:

    =PROPER(TRIM(LEFT(SUBSTITUTE(MID(A2,FIND("Format:",A2)+8,99),")",REPT(" ",99)),98)))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    6,720

    Re: Extract text between specific string and closing parentheses

    Formula for B2

    =MID(A2,FIND("Format:",A2)+7,FIND(")",A2,FIND("Format:",A2))-FIND("Format:",A2)-7)
    Please Avoid Joining My List Of Blocked Users by:

    Saying Please and Thank you.

    Making requests not demands.

    Checking back on your post. I will not edit any post after 4 days.

    Marking threads as closed once your issue is resolved. How? The tools at the top

    Any reputation (*) points appreciated. None of us gets paid here.

    If you found someone's input useful, please take a second to click the * at the bottom left to let them know

  4. #4
    Registered User
    Join Date
    10-22-2019
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Extract text between specific string and closing parentheses

    Quote Originally Posted by AliGW View Post
    Try this:

    =PROPER(TRIM(LEFT(SUBSTITUTE(MID(A2,FIND("Format:",A2)+8,99),")",REPT(" ",99)),98)))
    Again, thank you for your help. I can confirm this works and returns exactly what I want

  5. #5
    Registered User
    Join Date
    10-22-2019
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Extract text between specific string and closing parentheses

    Quote Originally Posted by mehmetcik View Post
    Formula for B2

    =MID(A2,FIND("Format:",A2)+7,FIND(")",A2,FIND("Format:",A2))-FIND("Format:",A2)-7)
    This too Thanks for taking a look.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    Excel 2019 (Win 10 - Work) & 365 Subscription (Win 10 - Home)
    Posts
    32,526

    Re: Extract text between specific string and closing parentheses

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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