I think you may wat to try the following: if (vala >650) and (vala <920) then go sub xx