Fourth : I recommend you to indent as follows. IF A THEN IF B THEN C D ELSE IF E THEN F ENDIF ENDIF ELSE G ENDIF