+ Reply to Thread
Results 1 to 7 of 7

Can`t remove all text to the right of a "("

  1. #1
    Valued Forum Contributor
    Join Date
    02-21-2010
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2007
    Posts
    502

    Can`t remove all text to the right of a "("

    below is a script that removes a parentheses. How do I need to change this script so that all text to the right of the parentheses including the parentheses is removed?
    For example: "John Dow(Planning Department)" changed to "John Dow"

    Please Login or Register  to view this content.
    Last edited by arlu1201; 06-05-2012 at 07:54 AM. Reason: Code tags not quote tags.

  2. #2
    Forum Contributor
    Join Date
    01-20-2012
    Location
    Amsterdam, The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    186

    Re: Can`t remove all text to the right of a "("

    Hi Dschmitt,

    I would use something like this

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: Can`t remove all text to the right of a "("

    Here are my 2 cents

    Please Login or Register  to view this content.
    Buran
    If you are pleased with a member's answer then use the Star icon to rate it.

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Can`t remove all text to the right of a "("

    Hi dschmitt,

    Play with Left function instead of substitute, see below code:-

    Please Login or Register  to view this content.
    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  5. #5
    Valued Forum Contributor
    Join Date
    02-21-2010
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2007
    Posts
    502

    Re: Can`t remove all text to the right of a "("

    thank you rkey. That worked.

  6. #6
    Valued Forum Contributor
    Join Date
    02-21-2010
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2007
    Posts
    502

    Re: Can`t remove all text to the right of a "("

    thank you buran and dilipandey. Your scripts work equally well.
    Who would have thought that I get within 5 minutes threee different methods.
    Great

  7. #7
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Can`t remove all text to the right of a "("

    Cheers


    Good to hear that...

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

+ 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