Results 1 to 14 of 14

Routine to remove brackets around words, leaving the format intact. Doesn't always work.

Threaded View

  1. #1
    Registered User
    Join Date
    12-07-2012
    Location
    London, England
    MS-Off Ver
    Office 2010
    Posts
    81

    Routine to remove brackets around words, leaving the format intact. Doesn't always work.

    For JINDON

    Dear Jindon, you and others were kind enough to supply a routine for me that would take words in brackets in a sentence, which were coloured differently from the rest of a sentence, remove the brackets, and leave the colouring of the words intact.

    Original post:

    http://www.excelforum.com/excel-prog...63#post3146163


    I've included the original test sheet. It has 2 routines; ColourBrackets, which colours red any words in brackets, and RmBrackets, which is your routine, and which removes the brackets.

    However, it doesn't always work.

    If you take the test sentences I've supplied, and run ColourBrackets, you'll see that it works correctly, colouring all the bracketed words.

    But if you then run your routine, it removes the brackets, but colours ALL words in red in the case of one sentence, but works fine with the other!

    Lots of things work fine, but sometimes it does this. It is consistent. Run either sentence as often as you like and the result will be the same.

    There is obviously something tripping it up, but I'm blowed if I can see what it could be.

    Help with this would be very much appreciated.

    Regards.
    Attached Files Attached Files
    Last edited by staggers47; 04-29-2013 at 06:36 AM.

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