You say IF RRA==num, which is only true if they are EXACTLY equal. Change the == to >= and it should work right.