Combined IfThen and IfThenElse