Help with an IF statement
Hi, i need to do an IF statement, does it support AND and OR in the same statement?
If Card1val = "A" And Card2val = "K" OR Card1val = "K" And Card2val = "A" Then
bascially, both need to contain A and K, doesnt matter which contains it. just as long as one of them has A, and the other has K.
Re: Help with an IF statement
Code:
If (Card1val = "A" And Card2val = "K") OR (Card1val = "K" And Card2val = "A") Then
Re: Help with an IF statement
well... you can make it
If Card1val = "A" And Card2val = "K" Then
'code
ElseIf Card1val = "K" And Card2val = "A" Then
'code
Else
'code
End If
but i suggest jggtz's code is better...
Re: Help with an IF statement
ive gone for jggtz method. thanks both!
Re: Help with an IF statement
Please use the thread tools and mark the post "Resolved".
Thanks. :)