Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 2 of 2

Thread: multiple "like" conditions

  1. #1
    Join Date
    25th May 2006
    Posts
    33

    multiple "like" conditions

    Hi all;

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

    VB:
    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

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    25th May 2006
    Posts
    33

    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:

    VB:
    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, 18:19
  2. "or" conditions in mutliple column counting?
    By bobthe in forum EXCEL HELP
    Replies: 11
    Last Post: April 2nd, 2005, 09:51
  3. Multiple "Range" with the "Cells" property?
    By jopu in forum EXCEL HELP
    Replies: 2
    Last Post: November 18th, 2004, 22:52
  4. Applying 2 or more conditions in "Sumif" function
    By i_shyam in forum EXCEL HELP
    Replies: 3
    Last Post: September 6th, 2004, 21:36

Bookmarks

Posting Permissions

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