Nested AND OR expressions
With worksheets("Someworksheetnamehere")
if .range("J11").value = 11 _
and (lcase(.range("e1").value) = "1bx" _
or lcase(.range("e1").value) = "2bx" _
or lcase(.range("e1").value) = "3bx") then
.range("iv99").value = 1
else
.range("iv99").value = .range("j1").value
end if
end with
I "put" the value in IV99, I'm not sure where you wanted it.
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
--
Dave Peterson
|