Searching for particular characters and return True or False

  • I am trying to adopt a code to find special characters in a string. Macro works if cell contains only one character in the code, but does not work if it is with other characters which are not in the code.


    For instance, I am looking up semicolon sign anywhere in the string. If cell contains only one semicolon, it returns false as expected. However, if cell contains


    Code
    abcd;


    it returns true as not expected. How can I arrange it?

    [SIZE=4]"I don’t pretend we have all the answers. But the questions are certainly worth thinking about."
    Sir Arthur C. Clarke
    [/SIZE]

  • To do what I think you are trying to do, maybe move the Exit For:

  • Thanks. It works like a charm.

    [SIZE=4]"I don’t pretend we have all the answers. But the questions are certainly worth thinking about."
    Sir Arthur C. Clarke
    [/SIZE]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!