Formula that checks all conditions