Condition Statement
If cell(1,2)=bear Then
If cell(1,3)=Blue Then return ElseIf cell(1,3)=Red Then return
ElseIf cell (1,2) <Bear Then
If cell(1,3)=Yellow Then return
End if
You are trying to use a single line if statement but are using multiple
lines. It either all has to be on one line or use a multiple line
construct. In the above, the outer IF is multiline and the second level IF
is single line.
If cell(1,2)=bear Then
If cell(1,3)=Blue Then
return
ElseIf cell(1,3)=Red Then
return
End if
ElseIf cell (1,2) <Bear Then
If cell(1,3)=Yellow Then return
End if
Is another alternative.
or
if cell(1,2)=bear and cell(1,3) = Blue or cell(1,3)=Red then
return
elseif cell(1,2)<bear and cell(1,3)=Yellow then
return
End if
--
Regards,
Tom Ogilvy
"Stel" wrote in message
...
If cell(1,2)=bear Then
If cell(1,3)=Blue Then return
ElseIf cell(1,3)=Red Then return
ElseIf cell (1,2) <Bear Then
If cell(1,3)=Yellow Then return
...
Can this explain better?
Thank you very much!
|