• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

If/And in VB

loach

New Member
Hello,

I am using the following formula in a cell on a worksheet and was wondering if there is a VB alternative which accomplishes the same function: =IF((AND(B2="Yes",B3="No",B4="Yes",B5="no")),"Yes","")

Thanks!
 
Code:
x="No"
IF [B2]="Yes" and [B3]="No" and [B4]="Yes" and[B5]="no" then x="Yes"

Or

Code:
IF [B2]="Yes" and [B3]="No" and [B4]="Yes" and[B5]="no" then 
x="Yes"
Else
X="No"
End if
 
Last edited:
Back
Top