+ Reply to Thread
Results 1 to 3 of 3

removing parentheses and contents from end of string.

  1. #1
    Forum Contributor
    Join Date
    04-16-2016
    Location
    bognor
    MS-Off Ver
    Pro-Plus 2016
    Posts
    153

    removing parentheses and contents from end of string.

    Hi all

    I have a group of strings of varying length like this,at the end there parentheses() with again varying length strings seperated by a -.

    Here are three random examples:

    the cat sat on the mat(aa-bb)
    the birds fly away in winter and who can blame them(a-ccc)
    trouble at mill(cc-eeffgg)

    I am trying to find a way (in vba or an XL function) to get rid of the parentheses themsleves() and the content of the parenthesis and just leave the remaining string.
    Any help much appreciated.

    Kind Regards
    BIF

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent SAC
    Posts
    8,885

    Re: removing parentheses and contents from end of string.

    Select the data and use the Find/Replace dialog (Ctrl+h to invoke). Then enter (*) in the find box, leave replace empty and press Replace all.
    Rory

  3. #3
    Forum Contributor
    Join Date
    04-16-2016
    Location
    bognor
    MS-Off Ver
    Pro-Plus 2016
    Posts
    153

    Re: removing parentheses and contents from end of string.

    Hi Rorya,

    Thankyou very much for the reply,your suggestion works fine

    Kind regards

    BIF

+ 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. Macro to duplicate a string but increase the number in parentheses
    By tisahardknocklife in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-07-2018, 06:22 AM
  2. Replies: 4
    Last Post: 10-21-2015, 04:26 PM
  3. [SOLVED] Regular Expression to get a string between parentheses in VBA
    By chief_abound in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-13-2015, 12:21 AM
  4. Executing methods - parentheses or no parentheses?
    By dmasters4919 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-23-2015, 07:57 PM
  5. [SOLVED] Extracting all text from parentheses (including parentheses)
    By j4ke101 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-10-2013, 08:03 AM
  6. Removing parentheses from text cell
    By Ronno in forum Excel General
    Replies: 4
    Last Post: 01-03-2013, 09:44 AM
  7. [SOLVED] Removing parentheses
    By Brett in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-09-2005, 01:06 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