Announcement

Collapse
No announcement yet.

multiple "like" conditions

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • multiple "like" conditions



    Hi all;

    I use 'like' statements in vba fairly regularly- example:

    Code:
     passcheck = activecell like "*Pass*"
    'and then..
    if passcheck = true then
       totalpasscount = totalpasscount + 1
    end if
    i was wondering if anyone knew a way to add more than one condition to a "like" statement- such as...

    passcheck = activecell like "Pass","P","*ass"

    which would sure help cause then i wouldnt have to code the same cellcheck 3 times. anyone know if its possible?

    Thanks

  • #2


    Re: multiple "like" conditions

    actually... the more i think about it, the more i doubt its an option.

    i actually need it to set the cell check to true based on an OR statement: such as:

    Code:
     redwhitenbluecheck = activecell like "red" OR "white" OR "blue"
    anyway, if you have any input, its appreciated. =)

    Comment

    Working...
    X