+ Reply to Thread
Results 1 to 7 of 7

Replace text of with the text string of the last Open and Close parenthesis

  1. #1
    Forum Contributor
    Join Date
    05-13-2009
    Location
    Manila philippines
    MS-Off Ver
    Excel 2010
    Posts
    113

    Replace text of with the text string of the last Open and Close parenthesis

    Hi,

    I would like to request for help about replacing of a text based on the last open and close parenthesis of a text string.

    replace text.PNG

    Please let me know if this is possible

  2. #2
    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,647

    Re: Replace text of with the text string of the last Open and Close 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.

  3. #3
    Forum Contributor
    Join Date
    05-13-2009
    Location
    Manila philippines
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: Replace text of with the text string of the last Open and Close parenthesis

    Apologies. Attached is the sample workbook for reference.
    Attached Files Attached Files

  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,647

    Re: Replace text of with the text string of the last Open and Close parenthesis

    Try this:

    =SUBSTITUTE(SUBSTITUTE(A2,TRIM(RIGHT(SUBSTITUTE(A2," (",REPT(" ",99)),98)),B2),"((","(")
    Attached Files Attached Files
    Last edited by AliGW; 08-26-2021 at 03:31 AM. Reason: Correction

  5. #5
    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,647

    Re: Replace text of with the text string of the last Open and Close parenthesis

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

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  6. #6
    Forum Contributor
    Join Date
    05-13-2009
    Location
    Manila philippines
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: Replace text of with the text string of the last Open and Close parenthesis

    Thank you for the formula you provided. It works!

  7. #7
    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,647

    Re: Replace text of with the text string of the last Open and Close parenthesis

    Glad to 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. [SOLVED] Open and close parenthesis with letter c
    By RJ1969 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-25-2021, 12:24 PM
  2. Replace any text Surrounded by a parenthesis
    By SamPaulRogers in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-04-2019, 02:30 PM
  3. [SOLVED] Search cell A1 for text string from B1, replace with text string from C1
    By portokie in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-22-2019, 09:16 AM
  4. Extract text after one open parenthesis
    By dianaCatz in forum Excel General
    Replies: 4
    Last Post: 03-28-2019, 12:16 PM
  5. Open PDF, replace text in text box, save,close
    By JPSIMMON in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-21-2016, 06:47 PM
  6. [SOLVED] VBA code to open many files, copy text, close file, paste text in second work
    By Bikeman in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 02-11-2014, 12:59 PM
  7. Replies: 13
    Last Post: 11-29-2012, 08:25 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