Ozgrid Excel Help & Best Practices Forums

Excel Training / Excel Dashboards Reports

Results 1 to 2 of 2

Thread: multiple "like" conditions

  1. #1
    Join Date
    26th May 2006

    multiple "like" conditions

    Hi all;

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

     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?


    Excel Video Tutorials / Excel Dashboards Reports

  2. #2
    Join Date
    26th May 2006

    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:

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

    Excel Video Tutorials / Excel Dashboards Reports

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Replies: 2
    Last Post: August 27th, 2005, 19:19
  2. "or" conditions in mutliple column counting?
    By bobthe in forum EXCEL HELP
    Replies: 11
    Last Post: April 2nd, 2005, 10:51
  3. Multiple "Range" with the "Cells" property?
    By jopu in forum EXCEL HELP
    Replies: 2
    Last Post: November 18th, 2004, 23:52
  4. Applying 2 or more conditions in "Sumif" function
    By i_shyam in forum EXCEL HELP
    Replies: 3
    Last Post: September 6th, 2004, 22:36


Posting Permissions

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