Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: comparing cell values to wildcards in a string?

  1. #1
    New Member
    Join Date
    Apr 2002
    Location
    KC, MO
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I'm looking for a VBA argument to help me define criteria. I tried the conditional formatting, but I can't figure out how to type this formula. I want to ClearContents or DeleteRow for any cell value that is not in for format ##XXXXXX, where # is any numeric and X is any alpha character. I also want to do conditional formatting and highlight a cell if the criteria is "xxxxxxCEx3T" where
    x is any alpha character. Am I just not finding the right wildcards to do this or using the wrong format/argument?

    In case you couldn't tell, I'm new.

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Use the Like Operator


    MatchPattern = YourValue Like "##??????"
    'if MatchPatter = False then delete your row
    MatchPattern = YourValue Like "??????CE?3T"
    'if MatchPatter = True then do your formatting


    Tom

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •