Hi excel users.
Can someone explain to me why the code below evaluates to true when it should evaluate to false. (Yes I know the second or statement is the same - Changing it does fix the problem -I fixed it in my real code), but shouldn't it still evaluate to false regardless, as the first condition is false?
'Range("e9") = 1'. Yes E9 is blank.
Thanks.
Can someone explain to me why the code below evaluates to true when it should evaluate to false. (Yes I know the second or statement is the same - Changing it does fix the problem -I fixed it in my real code), but shouldn't it still evaluate to false regardless, as the first condition is false?
'Range("e9") = 1'. Yes E9 is blank.
Code:
Sub test()
If Range("e9") = 1 And Range("f9") = 1 Or Range("f9") = 1 Then
Range("e10") = "yes"
Else: Range("e10") = "no"
End If
End Sub
Thanks.