this might work well for you A=RND(5) IF A==1 THEN (whatever here) IF A==2 THEN (whatever here) and so on...