Nested AND OR expressions
It must be the fatigue:
---------------------
Sub Test()
If [J1] = 11 And ([E1] = "1bx" Or [E1] = "2bx" Or [E1] = "3bx") Then
Result = 1
Else
Result = [J1]
End If
End Sub
-------------
Micky
"Colin Hayes" wrote:
HI
I need to express something in VBA , and am having trouble with it.
I need to say this :
IF E1 CONTAINS "1bx" OR "2bx" OR "3bx" AND J1 =11 THEN PUT 1 , OTHERWISE
PUT J1
Can someone assist with some code to make this happen , please?
Grateful for any help.
Best Wishes
.
|