Wildcard Doesn't Work

  • I Have an Excel Sheet With in cell:
    A1=SPAAA482340984023408
    B1="=If(A1="spaaa*";"True";"False")"


    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?


    Thanks


  • or a boolean version of Will's solution :


    =Left(A1,5)="SPAAA"

  • 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.