Wildcard Doesn't Work

  • I Have an Excel Sheet With in cell:

    My problem is: The "*" sign is ignored as a wildcard. The outcome results always as "False"

    Both A1 and B1 are set as Text cells.

    What to Do?


  • or a boolean version of Will's solution :


  • MyCheck = "SPAAA232143" Like "SPAAA*" ' Returns True.
    MyCheck = "SPit12334" Like "SPAAA*" ' Returns False.

    I just modified the help example for like.

    but you should be able to use this in either a function macro or whatever.

Participate now!

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