excel vba crew.. help please easy stuff :x:

Discussion in 'OT Technology' started by GuOD, Feb 13, 2008.

  1. GuOD

    GuOD mcflurry diet

    Joined:
    May 19, 2003
    Messages:
    7,366
    Likes Received:
    0
    Location:
    Toronto
    I'm trying to check 4 criteria (4 diff cells) in each row.

    I was wondering if there's code to simultaneously check all 4 at once, rather than doing a series of IF statements to check each one after the first one was checked.

    anyone got ideas? :x:
     
  2. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    what are you checking for? You could build a long string of logic, depending on what you're trying to determine.
     
  3. peerk

    peerk New Member

    Joined:
    Mar 14, 2005
    Messages:
    984
    Likes Received:
    0
    Yeah, post what you are trying to do. It could be something simple like:

    Code:
    If Cells(Row, 1).Value = "val1" AND Cells(Row, 2).Value = "val2" AND Cells(Row, 3).Value = "val3" AND Cells(Row, 4).Value = "val4" Then
    
    End if
    
     
  4. GuOD

    GuOD mcflurry diet

    Joined:
    May 19, 2003
    Messages:
    7,366
    Likes Received:
    0
    Location:
    Toronto
    thanks that's exactly it peerk (well, slightly more complicated but I can make it work)

    I didn't know you could use AND :o

    no official programming lessons FTL


    (this would have saved me a lot of time before too :mamoru:)
     
    Last edited: Feb 14, 2008

Share This Page