View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Condition Statement

Try to structure your argument in a logical way using
indentation. In this way you will find it easier to see
what is wrong with your logic, and you'll be able to
explain it to someone else as well:

If Cells(1, 2) = Bear Then
If Cells(1, 3) = Blue Then
Return
Else
If Cells(1, 3) = Red Then
Return
End If
End If
Else
If Cells(1, 2) < Bear Then
If Cells(1, 3) = Yellow Then
Return
End If
End If
End If


-----Original 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!


.