|
-
Feb 13th, 2009, 06:46 PM
#1
Thread Starter
Addicted Member
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.
-
Feb 13th, 2009, 06:54 PM
#2
Re: Help with an IF statement
Code:
If (Card1val = "A" And Card2val = "K") OR (Card1val = "K" And Card2val = "A") Then
-
Feb 13th, 2009, 06:55 PM
#3
Fanatic Member
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...
-
Feb 13th, 2009, 07:01 PM
#4
Thread Starter
Addicted Member
Re: Help with an IF statement
ive gone for jggtz method. thanks both!
-
Feb 13th, 2009, 07:37 PM
#5
Re: Help with an IF statement
Please use the thread tools and mark the post "Resolved".
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|